Code Monkey home page Code Monkey logo

wmiexec's Introduction

WMIexec

Set of python scripts which perform different ways of command execution via WMI protocol.

Blog Post

https://whiteknightlabs.com/2023/06/26/navigating-stealthy-wmi-lateral-movement/

Usage

wmiexec_scheduledjob.py

Is a python script which authenticates to a remote WMI instance and execute commands via Scheduled Tasks.

To run the script:

python3 wmiexec_scheduledjob.py -i <ip_address> -u <username> -p <password> -c <command>

wmiexec_win32process.py

Is a python script which authenticates to a remote WMI instance and execute commands via Win32_Process.

To run the script:

python3 wmiexec_win32process.py -i <ip_address> -u <username> -p <password> -c <command>

webserver_ssl.py

Is a python script which creates a HTTPS server (with a self-signed SSL certificate). Used to exfiltrate the command's output.

Before running the HTTP server, make sure to generate the certificates by running:

openssl genpkey -algorithm RSA -out server.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

If everything is done correctly, the server will be running without any error:

python3 webserver_ssl.py

Demo

wmi_in_action

Credits

https://github.com/XiaoliChan/wmiexec-RegOut
https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-scheduledjob

Author

Kleiton Kurti (@kleiton0x00)

wmiexec's People

Contributors

wkl-sec avatar kleiton0x00 avatar

Stargazers

JS avatar d1n38h avatar topanga avatar Zllggggg avatar iojymbo avatar  avatar  avatar 5l1v3r1 avatar Jim avatar Lenxy avatar k3nundrum avatar  avatar test avatar Erik avatar  avatar castel avatar  avatar  avatar  avatar Soumyani1 avatar  avatar  avatar  avatar Ali avatar  avatar O.T Osman avatar drgreentumb93 avatar Yuuki Ebihara avatar Matthew McAteer avatar  avatar K. avatar Steven avatar  avatar  avatar ztko avatar  avatar DrUnpopular avatar Nicolas Vincent avatar Shr3k avatar  avatar LSA avatar Noah avatar IsraM0xnts avatar Dor  avatar  avatar 0x08 avatar allen.hu avatar Fab avatar  avatar parzival avatar AVA avatar S avatar hirak0 avatar  avatar PikaChu avatar snake avatar Sandalots avatar 爱可可-爱生活 avatar  avatar Sult4n avatar  avatar  avatar Alec Akin avatar  avatar Dady Nasser 89 avatar  avatar Diego Capriotti avatar Artem Kondratenko avatar xsshim avatar py_001 avatar hywell avatar taka avatar Scott Judson avatar  avatar th3k3ymak3r avatar Roy Weisfeld avatar  avatar  avatar (⋆❛ ہ ❛⋆)⊃.:☆..:*・☆ avatar Tomas Rzepka avatar the Netsurfer avatar mayter avatar beerandgin avatar Mahesh Parmar avatar VivaDaVivid avatar lcsm avatar Andrew Gu avatar Ryan Stephenson avatar  avatar  avatar Cristiano Nunes avatar  avatar  avatar darkkid avatar  avatar  avatar  avatar Uknow avatar  avatar Tom Tom avatar

Watchers

 avatar Mădălin Dogaru avatar  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.