PDA

View Full Version : Python for Pentesintg



ZeroBoy
09-26-2013, 06:49 PM
Hello Everybody,

I started a blog about using Python for penetration testing. I'm going to write about everything useful for pentesters, also some useful Python basics for writing a strong tools.
you might like to take a look :
http://pytesting.blogspot.com/

b0nd
09-27-2013, 11:28 AM
Hello Everybody,

I started a blog about using Python for penetration testing. I'm going to write about everything useful for pentesters, also some useful Python basics for writing a strong tools.
you might like to take a look :
http://pytesting.blogspot.com/

Cool! Appreciate if you post link to your blog post here each time you put something new there. We'll get to learn some stuff and you'll get traffic on your blog - win-win situation :)

Infact you can create a new thread here for your each blog post. Would be each to comment and give feedback.

Cheers!

ZeroBoy
09-27-2013, 06:34 PM
Thanks for compliments bro, i appreciate it. and yes, i'm gonna update this thread with the new article. also, i created a facebook page (found in the blog) to discuss many issues and contains new updates in the blog. i also replied to your question there ;)

ZeroBoy
09-27-2013, 06:38 PM
You’re a Pentester, and a company asked you to pentest their system because they realized that someone behind his computer messing with the system. You bring your tools arsenal and start doing penetration testing stuff. Unfortunately, all of your tools have failed to detect and exploit the system. The person who is responsible of information security asked you a full-detailed report of security holes and how you found them (used tools and techniques…). What do you do when all tools fell down? You write in the report that the available tools are sucks?
Read more -> http://pytesting.blogspot.de/2013/09/introducing-pytesting-concept.html

ZeroBoy
10-11-2013, 05:00 PM
[+] Port Scanning with Python
1. Introduction
Port scanning is very important technique to probe a host for open ports. We can define it as trying to connect to the host from a list of ports, with the goal of finding an active ports and identifying running services on a targest to pentest it.

We can connect to any machine attached to the network using TCP/IP Protocol, by providing it's address and port number. Port number varies from 1 to 65536.
As a result of scan on a port, we can get:
[+] Open or Accepted: The host established a connection
[+] Closed, Denied or Not Listening: The specified port is closed

Read more -> http://goo.gl/iEz6FJ

ZeroBoy
02-04-2014, 10:23 PM
SSH Attack Victors and Penetration Testing

1. Introduction
SSH or Secure Shell is a secure network protocol used to log into a remote machine and execute commands. It supports also Secure File Transfer and Tunneling/Forwarding TCP ports connections. All communications are automatically encrypted using the public-key cryptography. SSH supports different types of authentication, what concerns us in this article is the password-based authentication and public key-based authentication.

[+] Password-based authentication: is simply giving the password to establish a secure shell.
[+] Public key-based authentication: user should manually generate public-private key pair and store the public key in the directory ~/.ssh/authorized_keys on the remote machine. Everytime the user wants to establish a Secure Shell, he should pass the private-key to the remote machine, and if the matching public-key found in ~/.ssh/authorized_keys directory on the remote machine, the user can authenticate without using a password.


So basically, we are going to discuss two attack victors:
[+] SSH Password Brute Force
[+] SSH Weak Private-Keys Brute Force

Read more: http://pytesting.blogspot.com/2014/02/ssh-attacks-and-penetration-testing.html (Read more: http://pytesting.blogspot.com/2014/02/ssh-attacks-and-penetration-testing.html)

ZeroBoy
03-03-2014, 01:38 PM
FTP Anonymous Login Scanner

This script do an Anonymous Login scan of random FTP hosts. It uses threads to scan multiple hosts at the same time in order to make the scan faster.
The help text of the script looks like this:


Usage: AnonFTP.py [options]

Options:
-h, --help show this help message and exit
-n nHost Number of hosts
-o FILE, --output=FILE
File to save logs
-v, --verbose Logs everything
-t TIMEOUT, --timeout=TIMEOUT
Timeout in seconds
-m MAX, --maxthread=MAX
Maximum thread number


Screenshot of the script's output:

648

The script and the blogpost is HERE (http://pytesting.blogspot.com/2014/03/ftp-anonymous-login-scanner.html)