靶机信息
下载地址:http://www.vulnhub.com/entry/odin-1,619/ 难度: 简单 原描述:
Odin ventured to the Well of Mimir, near J?tunheim, the land of the giants in the guise of a walker named Vegtam. Mímir, who guarded the well, to allow him to drink from it, asked him to sacrifice his left eye, this being a symbol of his will to obtain knowledge Pls, add /etc/hosts -> ip vm + odin example: 192.168.1.1 odin Twitter: @ArmBjorn Work in Virtualbox. Get root permissions 奥丁冒险到密米尔之井,在约顿海姆附近,一个名叫维塔姆的行走者伪装成巨人的土地。Mímir,看守井的人,为了让他喝井里的水,要求他牺牲他的左眼,这是他获得知识意志的象征。
渗透过程
获取ip
arp-scan -l
得到靶机的ip为192.168.1.105. 
端口扫描
nmap -A -T4 -p 1-65535 192.168.1.105
这里开放了一个80端口。 
修改/etc/hosts
vi /etc/hosts
根据靶机题目要求,我们添加这个ip和odin的映射到/etc/hosts中。 
访问靶机http
访问http://odin 或者http://192.168.1.105我们可以看到一个页面。这里写着“Just another joomla site”,仿佛在告诉我们这是一个基于joomla搭建的网站。(其实不是) 
joomla有一个专门的工具——joomscan,我们来扫描一下这个joomla有没有什么漏洞。
joomscan http://192.168.0.105
 emmmmmm。起码我们知道了joomla的版本是5.5.3。 这个网站内容还是挺多的,我们逐个往下看。
-
首先这个网站上有很大的一块内容:“NB2HI4DTHIXS6Z3JORUHKYROMNXW2L3EMFXGSZLMNVUWK43TNRSXEL2TMVRUY2LTORZS6YTMN5RC63LBON2GK4RPKBQXG43XN5ZGI4ZPJRSWC23FMQWUIYLUMFRGC43FOMXXE33DNN4W65JOOR4HILTUMFZC4Z32EBZG6Y3LPFXXKIDONFRWKIDXN5ZGI3DJON2AU===” 我首先想到的是base64编码,但是我用base64解码发现解出来是乱码。  -
然后我注意到了这个图片,图片下面也是疑似base64编码的内容。
 我尝试解码,这次算是解码出了正常的东西。  然后我把目光放到了这张图片上。我把图片下载下来,然后用exiftool查看,果然有点东西。这个图片的Make字段是用base64编码的,解码后得到“admin:qwerty”。  然后我们往下看,这个网站又成了WordPress了,很皮。。。 我们得到了账户名和密码,点击页面最下方的Log in,输入账号密码。  我们获得了一个这样的页面消息。  Emmmmm,我点了这个邮箱正确。应该没有什么影响吧。。。。。。 我们现在是以管理员身份登录了Wordpress网站。
获取shell
至此,我们已经能够以管理员身份登录wordpress网站了,我们的下一个目标应该是getshell,然后再进一步获取root权限。
我们看到这里可以上传插件,我们可以上传一个php-reverse-shell.php上来,然后访问http://odin/wp-content/uploads/2021/08/php-reverse-shell.php,同时监听相应的端口即可。具体操作如下:
- 修改kali自带的php-reverse-shell.php。
cp /usr/share/webshells/php/php-reverse-shell.php ./
nano ./php-reverse-shell.php
修改ip为kali的ip,同时记住端口号1234,自己修改端口号也可以。
 2. 上传插件。依次点击Plugins——Upload Plugin——Browse,选择我们改好的php-reverse-shell.php,然后点击右边的Install Now。   然后根据我们上传的时间,我们访问以下网址,同时nc监听1234端口:
nc -lnvp 1234
浏览器搜索 http://odin/wp-content/uploads/2021/08/php-reverse-shell.php
这时,我们就可以得到shell。 
获取root权限
根据VulnHub_HarryPotter:Aragog (1.0.2)靶机的经验,我们去找一下wp-config.php这个文档,里面会记录mysql中的用户和密码信息。在/var/www/html目录下我们找到了这个文档,打开,我们看到文档的最后一行有以下内容。  这段内容应该记录了和root相关的信息,我们用john工具破解一下这个密码。 首先把这段信息写入到一个文档中。  然后,用John破解一下。  这里我们直接就得到了root的密码…  我们查看root目录,这里有一个文件,然后base64解码,我们得到了一个油管的网址。  完结,撒花!
这个作者的一系列皮操作
你以为是线索,但是幸幸苦苦破解出来,就,挺想微笑的。  以下是我用dirb扫描网站得到的一个网址: 
|