Pivot your way deeper into networks by discovering hosts & ports, using a compromised machine via SSH

Overview

Contents

Puwr

Easily expand your attack surface on a local network by discovering more hosts, via SSH. Using a machine running a SSH service, Puwr uses a given subnet range to scope out IP's, sending back any successful ping requests it has. This can be used to create a pivoting attack from a compromised machine, by returning you hosts you couldn't normally discover from your own device. Open ports can then be probed on these discovered devices, to find a gateway into attacking more devices.

LogoImage

See how ping requests are sent from the compromised machine to different devices on its network. Successful replies are sent back to your device from the SSH tunnel.

Of course feel free to fill out an issue request if there are any bugs in the script, or if you think anything should be added/removed. (https://github.com/Xeonrx/Puwr/issues)

Upcoming

Here are some new features I plan to add in along with the upcoming update.

  • Scan for open ports of discovered hosts (DONE)
  • Change CLI output to look more neat and organized (DONE)
  • Enumerate information on "victim" host for privilege escalation
  • Optional colored output

Usage

Puwr is simple to run, only requiring 4 flags:
python3 puwr.py (MACHINE IP) (SSH USER) (SSH PASSWORD) (SUBNET VALUE)

example:
python3 puwr.py 10.0.0.53 xeonrx password123 10.0.0.1/24

If you need to connect through a port other than 22, use the -p flag. (example: -p 2222)
If you want to keep quiet, use the -s flag to wait specified seconds between requests. (example: -s 5)
You can use --scan to probe open ports on discovered devices. (example: --scan 80 443)
Use the -h flag for usage reference in the script.

The paramiko and netaddr modules are required for this script to work!
You can install them with the pip tool: pip install netaddr paramiko

example

Here I scanned devices and checked which ones has port 80 and 443 open to target web applications.
Notice how the TTL number also displays, giving you a hint at what the device may be running on.

Tested Operating Systems

So far, I have only confirmed Puwr to work on a few operating systems:

  • Kali Linux
  • Parrot OS
  • Windows 10

However, it should work on almost any OS with Python, and the needed modules installed.

Port Scanning

As mentioned earlier a few times, you can now not only discover hosts, but also scan them for open ports.
This can be used to find an attack vector on devices running an accessable service. By default, ports will not be scanned, but you can use the --scan flag, and add the port numbers you'd like to scan.
Keep in mind however, that port scanning does take a good bit of additional time to complete. PORT SCANNING ONLY WORKS ON MACHINES WITH PYTHON 3 INSTALLED FOR NOW

Showcases

Here are a few of the many sources that have helped share Puwr with others, and I wanted to give a thanks to them!

Extra thanks to the people who left a star on the repo. Every one is very appreciated :)

Disclaimer

Note this script is purley just a small enumeration script, and does not directly attack any found devices on the network. Wether you decide to remain persistence on the machine and use it to attack other devices from it, is your choice. Puwr is designed to help aid you in pivoting, by purley discovering more targets for you to map out.

I encourage you carry out these techniques with permission, and stay in the legal bounds of things. Unathorized cyber attacks are highly illegal, and no one but you is responsible for any crime!

License

Puwr uses the MIT License. You can read about it here:

MIT License

Copyright (c) 2022 ciiphys

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...

Discord bot to run commands for AnimeSRgame via ssh (Linux VPS ONLY!!!!)

Discord bot to run commands for AnimeSRgame via ssh (Linux VPS ONLY!!!!)

CrepeSRConsole Example: https://discord.gg/vY8FvZpmqK Setup Install discord 2.0 (pip install git+https://github.com/Rapptz/discord.py), paramiko, pymo

Sep 20, 2022

Script that checks all Meraki switch ports in an organization and returns the existence of errors.

MERAKI_ORG_PORT_CHECK Script that checks all Meraki switch ports in an organization and returns the existence of errors. HOW TO USE IT Open the file "

Mar 29, 2022

A Python/Windows port scanner that scans for open and closed ports on IP addresses.

A Python/Windows port scanner that scans for open and closed ports on IP addresses.

DeLevo Port Scanner If you found this application interesting or useful, please consider starring the repo above. Usage Download Python from here if y

Apr 18, 2022

A script for forwarding ports in an iptables firewall, designed for use with my single-ip ProxMox setup.

proxpf A script for forwarding ports in an iptables firewall, designed for use with my single-ip ProxMox setup. Why? I recently have transitioned from

Apr 26, 2022

Mido is a python library for working with MIDI messages and ports

Mido - MIDI Objects for Python Mido is a library for working with MIDI messages and ports: import mido

Sep 21, 2022

Still using Try-Catch the old way? Hard-Coding log files into your code? Meh, use Decorators instead!

write-logs-like-pros What and Why? Every automated module and scheduled code will at some point run into problems that will cause exceptions to occur.

Jun 9, 2022

This repo hosts an arabic to roman converter, developed using Python

This repo hosts an arabic to roman converter, developed using Python. It also contains some documentation (Requirements, acceptance criteria and test cases), and some unit tests coded using python's unittest module.

May 17, 2022

"Make Your PDF Safe" or MYPDFS is a program that allows you to protect your PDFs with a password. This way your data will remain safe.

Make Your PDF Safe - MYPDFS "Make Your PDF Safe" or MYPDFS is a program that allows you to protect your PDFs with a password. This way your data will

Aug 31, 2022

ELT pipeline that extracts Reddit data, loads into s3 bucket, and transports into Redshift before being transformed via dbt and visualized in a PowerBI dashboard

ELT pipeline that extracts Reddit data, loads into s3 bucket, and transports into Redshift before being transformed via dbt and visualized in a PowerBI dashboard

Reddit ETL Pipeline A data pipeline to extract Reddit data from r/dataengineering. Output is a PowerBI dashboard, which provides an overview of topics

Apr 3, 2022
Owner
Anti-Security
null
Code used for the "Oh SSH-it, what's my fingerprint? A Large-Scale Analysis of SSH Host Key Fingerprint Verification Records in the DNS" paper

SSFHP DNS Measurement This repository contains the code and references to the datasets in the paper: Oh SSH-it, what's my fingerprint? A Large-Scale A

Sebastian Neef 3 Aug 19, 2022
A web application for more secure and convenient SSH connection to remote hosts.

リモート接続マネージャー より安全、より便利にリモートホストにSSHで接続するためのウェブアプリ。 アプリケーションの種類について リモート接続マネージャーはPythonで実装されたWebアプリケーションフレームワークのDjangoで開発されたウェブアプリです。 プログラムファイルをダウンロードして

Takuma Otake 1 Aug 19, 2022
Official implementation of the ICML 2022 paper "Going Deeper into Permutation-Sensitive Graph Neural Networks"

Permutation Group Based Graph Neural Networks (PG-GNN) The official implementation of Going Deeper into Permutation-Sensitive Graph Neural Networks (I

Zhongyu Huang 12 Sep 11, 2022
Verifies that Discord's index.js file has not been tampered with or compromised.

Discord Index Scanner (DIS) v1.0.0 Coded with ?? by Jam!3 & Fa00j Last updated 17/04/2022 - DM me @ [Jam!3]#4466 Discord Index Scanner scans Discord's

Jamie 2 Apr 17, 2022
Android Debug Bridge (adb) was vulnerable to directory traversal attacks that could have been mounted by rogue/compromised adb daemons during an adb pull operation.

CVE-2022-20128 Android Debug Bridge (adb) was vulnerable to directory traversal attacks that could have been mounted by rogue/compromised adb daemons

null 4 Sep 20, 2022
Analysing the US Bike-share data and deriving deeper data-driven insights from the same using python

US-Bikeshare-case-study Analysing the US Bike-share data and deriving deeper data-driven insights from the same using python The case-study was taken

Akanksh Hegde 1 Aug 15, 2022
Pellet helps improve your Django app performance by discovering N+1 queries.

Pellet Pellet helps improve your Django app performance by discovering N+1 queries. The Django ORM makes it easy to forget using select_related and pr

Harikrishnan Shaji 16 Aug 7, 2022
Plugin to assist with automating access to critical pwnagotchi data when a user cannot SSH into their device.

Pwnagotchi-Handshaker Plugin to assist with automating tasks and providing access to critical pwnagotchi data when ssh is not available. Why? Things b

Allordacia 3 Sep 9, 2022
Name your hosts after your favorite band's songs

jukeboxen.py Given a band name, downloads song data from discogs and outputs a list of their songs in DNS hostname (RFC ???) format. Now you can name

Brian King 1 Sep 19, 2022