Changes for page Engine_XalanJ

Last modified by Nicolas Gregoire on 2012/01/31 17:35

From version Icon 45.1 Icon
edited by Nicolas Gregoire
on 2012/01/11 23:38
Change comment: Upload new attachment xalanj-java-date.xsl
To version Icon 46.1 Icon
edited by Nicolas Gregoire
on 2012/01/11 23:44
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -50,6 +50,13 @@
50 50  
51 51  == OS command execution ==
52 52  
53 +Once Java code execution is possible, it is trivial to execute arbitrary OS commands using the java.lang.Runtime class. The attached PoC will not read the output of the executed command (because loops are hard in XSLT), but this is not a problem if a reverse-shell have already been started, isn't it ;-)
54 +
55 +
56 +Note : as arrays are not a native type in XSLT, we create one via split() before passing it as an argument to exec(String[] cmdarray).
57 +
58 +
59 +
53 53  The following code will execute the command "touch /tmp/hello" :
54 54  
55 55  <?xml version="1.0"?>