Git Product home page Git Product logo

hackserv's Introduction

HackServ IRC Bot

Version GitHub license Python3 GitHub issues GitHub stars GitHub forks

Advanced IRC bot/botnet PoC written in python 3. This bot is for educational purposes only! Do NOT use this bot on a computer or network without written permission from the owner(s)! This bot can connect to IRC over SSL and is compatible with Unrealircd's nospoof:PING. Seperate config file for easy upgrades.

Installation:

The following packages are required. You'll need to install the following using the package manager:

sudo apt install python3 python3-nmap nmap

Then clone this project by running the following command:

git clone https://github.com/trackmastersteve/HackServ.git

If you have sudo privleges, you can make the bot persist:

sudo useradd hackserv

Edit: hackserv.service with correct location of script i.e. /usr/local/bin/.hackserv.py

sudo cp hackserv.py /usr/local/bin/.hackserv.py

sudo cp hsConfig.py /usr/local/bin/hsConfig.py (Don't forget to edit this file aftwards)

sudo cp hackserv.service /etc/systemd/system/hackserv.service

sudo systemctl enable --now hackserv.service

So far it responds to the following commands:

.help (HELP menu)

.username (shows username of machine bot is running on)

.uptime (shows bot uptime)

.uname (get 1-line system info)

.sysinfo (get formated system info)

.osversion (get OS Version info)

.memory (get memory stats from linux machine)

.ip (get ip address of bot)

.macaddress (get mac address info)

.rsh [target] [port] (reverse shell to target)

.cmd [shell command] (run shell command on host)

.cno [shell command] (run shell command without output)

.chmd [file] [permissions] (change permissions of a file)

.fsdl (run file server to download files from)

.scan [ip] [comma,seperated,ports] (nmap port scanner)

.msg [target] [message] (sends a msg to a user/channel)

.ntc [target] [message] (sends a notice to a user/channel)

Hi [botnick] (responds to any user saying hello to it)

bye [botnick] (tells bot to quit)

.join [channel] (tells bot to join channel)

.part [channel] (tells bot to part channel)

.pj [channel] (tells bot to part then join channel)

.kick [channel] [nick] [reason] (tells bot to kick a user from a channel)

.mode [target] [mode] (set mode on nick or channel)

.nick [newnick] (sets a new botnick)

.raw [command] (sends a raw command to the server)

.ls [dir] (lists files in a directory)

.dl [url] [file] (downloads [url] and saves as [file])

.run [execute type] [executable file] (execute a file)

.upgrade [link] [file] (upgrades the hackserv.py file)

.mining [start/stop] (coming soon!)

.persistence (testing)

TODO

  • Move configuration to external file to make updates more seamless

  • Send/Receive CTCP commands (so far it responds to CTCP VERSION only)

  • Persistence (.service file was created to run this as a systemd service)

  • Convert the port scanner from nmap to sockets (to remove the nmap dependency) (TO Do List)

  • Send/Receive DCC commands (CHAT and TRANSFER) (To DO List)

  • Accept uploads from admin (File Server)

  • Auto Vuln/Port/Proxy Scan on join (Need ability to get IP from server) (To Do List)

  • Key Logger (To Do List)

  • Self Replicating (testing, not working yet)

  • Proxy Scanner (To Do List)

  • Vuln Scanner (To Do List)

  • Crypto Miner (To Do List)

  • Self proxy (To Do List)

  • DoS/DDoS (To Do List)

  • Open reverse shell/meterpreter

  • Run in Background - ('debugmode = False' setting allows bot to run in the background)

  • Better error handling (still a few bugs to work out)

  • Send downloads to admin (File Server)

  • Better handling of disconnects etc.

  • Run single shell commands

  • Better sigterm handling

  • Join and Part Channels

  • Execute files/code

  • NickServ Identify

  • SASL Auth Support

  • Connect over SSL

  • Get ip address

  • File Server

  • Self update

  • Help Menu

hackserv's People

Contributors

abdur-rahmaanj avatar kimmywacky avatar trackmastersteve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hackserv's Issues

.cycle bug

The '.cycle [channel]' command doesn't seem to work yet. I'm still trying to figure out why.

Bug in SASL

I found that using SASL now causes a bug on UnrealIRCd ping requests. And prevents the bot from fully connecting.

[Help needed?] Adding DoS/DDoS methods

if you want, i can write a few attack vectors for the bot. Ofcourse without Scapy, which will make the final binary a lot bigger, so the options are a bit limited.

Send me a message if you want me to push a commit :)

Reverse Shell won't connect

I'm still trying to figure out what I'm doing wrong on the reverse shell. The first socket connection to IRC works fine. But the reverse shell is the second socket connection and I'm not so sure I implemented it correctly.

Persistence

I'm still trying to make the time to figure out how to self replicate and create persistence.

won't reconnect EDIT: ping timeout

I've been trying to figure out what I'm doing wrong. But it's pinging out and realizing it's not connected. Therefor it's not trying to reconnect.

.notice bug

I can't seem to find why '.notice [target] [message]' is not working.

.help bug

Still trying to figure out the best way to have the bot one message per line of the 'help message'.

Bot Won Join Channel

Hi
First thank you for this Nice Bot

i'm facing problem when the bot connect to the server it wont join the channel i enabled the Debug mode to see what's wrong and i got this output

irc.eternal 266 Omega[90461] :Current Global Users: 9  Max: 10
[email protected] NOTICE Omega[90461] :Your nickname is not registered. To register it, use: /msg NickServ REGISTER password email
:irc.eternal 421 Omega[90461] 001 :Unknown command
:irc.eternal 421 Omega[90461] 002 :Unknown command
:irc.eternal 421 Omega[90461] 003 :Unknown command
:irc.eternal 421 Omega[90461] 004 :Unknown command
:irc.eternal 421 Omega[90461] 005 :Unknown command
:irc.eternal 421 Omega[90461] 005 :Unknown command
:irc.eternal 421 Omega[90461] 042 :Unknown command
:irc.eternal 421 Omega[90461] 375 :Unknown command
PING :irc.eternal

and when i do /msg OperServ USERLIST

i can see the bot connected to my server but not join the channel


-OperServ- Omega[90461]  Omega[[email protected]  Omega[90461] Omega[90461]
-
-OperServ- OperServ      [email protected]    Operator Service

Any Idea ?

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.