A python script that will use hydra to get user and password to login to ssh, ftp, and telnet

Overview

Hydra-Auto-Hack

A python script that will use hydra to get user and password to login to ssh, ftp, and telnet

Project Description

This python script was created to use when first entering a network to try and get user and password to login to any computer in the network with ssh, ftp, or telnet open. It can be used for pentesting and while playing CTF's. This script was created running against a docker network for testing purposes.

ProofOfConcept

  • Pull three docker ubuntu images
  • Create three docker containers running ubuntu image
  • For every container install ftp, ssh, or telnet
  • Change password for user to password that will be in password file you will use for hydra for each container
  • For ssh you need to uncomment #PermitRootLogin yes in /etc/ssh/sshd_config file
  • Check if these docker ips are coming up when running arp, if not ping the ip
  • Download python script
  • Change variables in lines 19-22 in main.py for specific configuration
  • Run script

Script Description

  • The script uses an important module call subprocess which lets us run command in a terminal from the script
  • You can change the variables in lines 19-22 to configure how the script should run
  • An arp scan is run which will take each found in the arp table, get just the ip numbers and convert from bytes to utf-8 and then add it to a new list of ips
  • Using the list of ips and nmap scan is run against each ip. It takes the ouput,splits each line and looks for the word "open" in the line. If the word "open" is written in the line then it gets the service and port from that line, converts from bytes to utf-8 and creates a list of open ports, which contains ip, port, service.
  • For every ip with a port open hydra is run against it using a user list and password list. It then checks if the word "host" and the ip is in the line. If it is, it gets the user and password from that line, converts it from bytes to utf-8 and adds it a list containing the ip, port, service, user, password. Then that list is appended to a list of logins
  • With all the logins information a new file is created and writes to it a list of all the logins, which will have the ip, port, service, user and password

Future Implements

  • Becaue hydra can take a long time to run it isn't efficient to have hydra run against each open port one at a time. So I will be implementing threading to run hydra against more than one open port at a time
  • Fix potential problem of all ports being closed which currently causes the script to get stuck. So I think adding if statements will solve this problem
  • Add a function that will also automatically login to the service using the login information
  • Add a function that downloads all the files from the open service
You might also like...
🤗 The largest hub of ready-to-use NLP datasets for ML models with fast, easy-to-use and efficient data manipulation tools
🤗 The largest hub of ready-to-use NLP datasets for ML models with fast, easy-to-use and efficient data manipulation tools

🤗 The largest hub of ready-to-use NLP datasets for ML models with fast, easy-to-use and efficient data manipulation tools

Get list of common stop words in various languages in Python

Python Stop Words Table of contents Overview Available languages Installation Basic usage Python compatibility Overview Get list of common stop words

Get list of common stop words in various languages in Python

Python Stop Words Table of contents Overview Available languages Installation Basic usage Python compatibility Overview Get list of common stop words

Phomber is infomation grathering tool that reverse search phone numbers and get their details, written in python3.
Phomber is infomation grathering tool that reverse search phone numbers and get their details, written in python3.

A Infomation Grathering tool that reverse search phone numbers and get their details ! What is phomber? Phomber is one of the best tools available fo

Simple GUI where you can enter an article and get a crisp summarized version.

Text-Summarization-using-TextRank-BART Simple GUI where you can enter an article and get a crisp summarized version. How to run: Clone the repo Instal

Label data using HuggingFace's transformers and automatically get a prediction service
Label data using HuggingFace's transformers and automatically get a prediction service

Label Studio for Hugging Face's Transformers Website • Docs • Twitter • Join Slack Community Transfer learning for NLP models by annotating your textu

Help you discover excellent English projects and get rid of disturbing by other spoken language

GitHub English Top Charts 「Help you discover excellent English projects and get

Words-per-minute - A terminal app written in python utilizing the curses module that tests the user's ability to type
Words-per-minute - A terminal app written in python utilizing the curses module that tests the user's ability to type

words-per-minute A terminal app written in python utilizing the curses module th

Owner
null
Open-Source Toolkit for End-to-End Speech Recognition leveraging PyTorch-Lightning and Hydra.

OpenSpeech provides reference implementations of various ASR modeling papers and three languages recipe to perform tasks on automatic speech recogniti

Soohwan Kim 26 Dec 14, 2022
Open-Source Toolkit for End-to-End Speech Recognition leveraging PyTorch-Lightning and Hydra.

OpenSpeech provides reference implementations of various ASR modeling papers and three languages recipe to perform tasks on automatic speech recogniti

Soohwan Kim 86 Jun 11, 2021
Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

Flexible interface for high performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra. What is Lightning Tran

Pytorch Lightning 581 Dec 21, 2022
Open-Source Toolkit for End-to-End Speech Recognition leveraging PyTorch-Lightning and Hydra.

?? Contributing to OpenSpeech ?? OpenSpeech provides reference implementations of various ASR modeling papers and three languages recipe to perform ta

Openspeech TEAM 513 Jan 3, 2023
Question answering app is used to answer for a user given question from user given text.

Question answering app is used to answer for a user given question from user given text.It is created using HuggingFace's transformer pipeline and streamlit python packages.

Siva Prakash 3 Apr 5, 2022
An easy to use, user-friendly and efficient code for extracting OpenAI CLIP (Global/Grid) features from image and text respectively.

Extracting OpenAI CLIP (Global/Grid) Features from Image and Text This repo aims at providing an easy to use and efficient code for extracting image &

Jianjie(JJ) Luo 13 Jan 6, 2023
This script just scrapes the most recent Nepali news from Kathmandu Post and notifies the user about current events at regular intervals.It sends out the most recent news at random!

Nepali-news-notifier This script just scrapes the most recent Nepali news from Kathmandu Post and notifies the user about current events at regular in

Sachit Yadav 1 Feb 11, 2022
This is a MD5 password/passphrase brute force tool

CROWES-PASS-CRACK-TOOl This is a MD5 password/passphrase brute force tool How to install: Do 'git clone https://github.com/CROW31/CROWES-PASS-CRACK-TO

null 9 Mar 2, 2022
Ελληνικά νέα (Python script) / Greek News Feed (Python script)

Ελληνικά νέα (Python script) / Greek News Feed (Python script) Ελληνικά English Το 2017 είχα υλοποιήσει ένα Python script για να εμφανίζει τα τωρινά ν

Loren Kociko 1 Jun 14, 2022