
Previously we delivered three guides – IPTables Basic Chapter 1, IPTables Basic Chapter 2, IPTables Basic Chapter 3 for the new server users. If you fall among that group, please check the articles for any missing step to arrange a basic security. After Securing Server, Basic Penetration Testing For Security is Needed. Here Are Few White Hat Tools & Commands For Testing Brute Force Vulnerability. These are not intended to run on others server. In very short, the shown methods are incapable to even initiate a genuine planned hacking attempt. But they are not for running these on other’s domain, server etc as your IP can get blacklisted and you are really a trained hacker.

What We Will Do With Tools & Commands For Testing Brute Force Vulnerability?

Brute force attack can be used to attempt to decrypt any encrypted data. For password guessing, this method is very fast for the short passwords and for longer passwords methods like dictionary attack are used. Brute force attacks are like problem solving technique. As theoretical time limit, we can increase the probability of time to be taken to break.

We will show how an attacker gathers the information and plan to run scripts as script kiddie to disturb you. If you can hide some (or most) of the information or broadcast misleading information, basically it becomes difficult to run the automated tools. We really can not make all points 100% fool proof. As we will know our weak points, we can do vigorous monitoring and logging around the weak points. It is obvious that, unlike our other guides we can not show each and every point to make secure.

Advertisement ---

Kali Linux, WHAX, Backbox, Pentoo etc are penetration test focused GNU/Linux distributions. Normally you’ll not need them for our guide. But you run Kali Linux as desktop OS to test, inform your web host about performing testing on your instance. Kali Linux is good as server OS as the kernel is designed to be injection proof and developers are restricted to directly commit on the project.

Among the tools Nmap, Crack, Ncrack, Aircrack-ng, Kismet, Wireshark, Metasploit Framework, Burp suite, John the Ripper, Social Engineering Toolkit, Maltego, THC Hydra, medusa etc are commonly known tools. Not all tools are possible to run from just another server. Some needs good graphics card (for faster calculation). So, we will show the command line tools and commands. Other tools can be found at Kali Linux’s list :

http://tools.kali.org/tools-listing 1 http : / / tools . kali . org / tools - listing

List of Tools & Commands For Testing Brute Force Vulnerability

Actually we shown few commands before with tools like nmap, but they were for just scanning port. DO NOT COPY PASTE THE COMMANDS from our and RUN on YOUR SERVER!. For tutorial purpose, we will use our servers or IPs and their output for giving examples. You should type them for your servers or IPs. Hacker can come by IP 23.227.167.33 or domain name thecustomizewindows.com . We will only show test with few which an ordinary user can use to increase security but can not hack in to others server easily :

apt-get install ncrack medusa hydra dmitry nmap ## for deb, ubuntu yum install ncrack medusa hydra dmitry nmap # for centos, rehl 1 2 apt - get install ncrack medusa hydra dmitry nmap # # for deb , ubuntu yum install ncrack medusa hydra dmitry nmap # for centos , rehl

It is obvious to check the basic stuffs by a targeted attacker :

curl -I 23.227.167.33 curl -I thecustomizewindows.com host thecustomizewindows.com host 23.227.167.33 whois thecustomizewindows.com 1 2 3 4 5 curl - I 23.227.167.33 curl - I thecustomizewindows . com host thecustomizewindows . com host 23.227.167.33 whois thecustomizewindows . com

Importance : Gives data about unmanaged third party services. Unmanaged DNS is easy to spoof.

nmap

First we need to install nmap :

yum install nmap # for centos, rehl apt install nmap # for deb, ubuntu 1 2 yum install nmap # for centos , rehl apt install nmap # for deb , ubuntu

If we run :

nmap -v thecustomizewindows.com 1 nmap - v thecustomizewindows . com

Ultimately we will get this information about open ports :

... Nmap scan report for thecustomizewindows.com (23.227.167.33) ... Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 1 2 3 4 5 6 7 8 . . . Nmap scan report for thecustomizewindows . com ( 23.227.167.33 ) . . . Not shown : 997 closed ports PORT STATE SERVICE 22 / tcp open ssh 80 / tcp open http 443 / tcp open https

Importance : We have 3 ports open to enter.

With nmap, we can detect which operating system with -A flag :

nmap -A 23.227.167.33 1 nmap - A 23.227.167.33

Output :

... 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.1 (Ubuntu Linux; protocol 2.0) ... 80/tcp open http nginx |_http-server-header: nginx ... 443/tcp open ssl/http nginx | http-robots.txt: 1 disallowed entry |_*.pdf$ |_http-server-header: nginx ... |_ssl-date: TLS randomness does not represent time | tls-nextprotoneg: | h2 |_ http/1.1 ... Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel ... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 . . . 22 / tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.1 ( Ubuntu Linux ; protocol 2.0 ) . . . 80 / tcp open http nginx | _http - server - header : nginx . . . 443 / tcp open ssl / http nginx | http - robots . txt : 1 disallowed entry | _ * . pdf $ | _http - server - header : nginx . . . | _ssl - date : TLS randomness does not represent time | tls - nextprotoneg : | h2 | _ http / 1.1 . . . Service Info : OS : Linux ; CPE : cpe : / o:linux : linux_kernel . . .

Importance : Ubuntu is likely not to be hardened unlike REHL. Server runs Nginx, we can find vulnerabilities. We can not fake as bot and put a PDF file. They are using latest OpenSSH. We can check whether the server or domain is using firewall with -sA flag :

nmap -sA 23.227.167.33 1 nmap - sA 23.227.167.33

Output :

... All 1000 scanned ports on thecustomizewindows.com (23.227.167.33) are filtered ... 1 2 3 . . . All 1000 scanned ports on thecustomizewindows . com ( 23.227.167.33 ) are filtered . . .

Importance : Ports are filtered but how is filtered is unknown.

We can check whether the server is doing packet filtering with -PN flag :

nmap -PN 23.227.167.33 1 nmap - PN 23.227.167.33

We can check the hosts and interfaces :

nmap --iflist 23.227.167.33 1 nmap -- iflist 23.227.167.33

Output :

... ************************INTERFACES************************ DEV (SHORT) IP/MASK TYPE UP MTU MAC lo (lo) 127.0.0.1/8 loopback up 65536 lo (lo) ::1/128 loopback up 65536 venet0 (venet0) 127.0.0.2/32 other up 1500 venet0 (venet0) 23.227.167.33/32 other up 1500 gre0 (gre0) (none)/0 other down 1476 gretap0 (gretap0) (none)/0 ethernet down 1476 00:00:00:00:00:00 teredo (teredo) (none)/0 point2point up 1280 teredo (teredo) fe80::ffff:ffff:ffff/64 point2point up 1280 teredo (teredo) 2001:0:53aa:64c:44f:12ed:e81c:58de/32 point2point up 1280 **************************ROUTES************************** DST/MASK DEV METRIC GATEWAY 0.0.0.0/0 venet0 0 ::1/128 lo 0 2001:0:53aa:64c:44f:12ed:e81c:58de/128 lo 0 fe80::ffff:ffff:ffff/128 lo 0 fe80::/64 teredo 256 2001::/32 teredo 256 ff00::/8 teredo 256 ::/0 teredo 1 ::/0 teredo 1024 ::/0 teredo 1029 ... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 . . . * * * * * * * * * * * * * * * * * * * * * * * * INTERFACES * * * * * * * * * * * * * * * * * * * * * * * * DEV ( SHORT ) IP / MASK TYPE UP MTU MAC lo ( lo ) 127.0.0.1 / 8 loopback up 65536 lo ( lo ) :: 1 / 128 loopback up 65536 venet0 ( venet0 ) 127.0.0.2 / 32 other up 1500 venet0 ( venet0 ) 23.227.167.33 / 32 other up 1500 gre0 ( gre0 ) ( none ) / 0 other down 1476 gretap0 ( gretap0 ) ( none ) / 0 ethernet down 1476 00 : 00 : 00 : 00 : 00 : 00 teredo ( teredo ) ( none ) / 0 point2point up 1280 teredo ( teredo ) fe80 :: ffff : ffff : ffff / 64 point2point up 1280 teredo ( teredo ) 2001 : 0 : 53aa : 64c : 44f : 12ed : e81c : 58de / 32 point2point up 1280 * * * * * * * * * * * * * * * * * * * * * * * * * * ROUTES * * * * * * * * * * * * * * * * * * * * * * * * * * DST / MASK DEV METRIC GATEWAY 0.0.0.0 / 0 venet0 0 :: 1 / 128 lo 0 2001 : 0 : 53aa : 64c : 44f : 12ed : e81c : 58de / 128 lo 0 fe80 :: ffff : ffff : ffff / 128 lo 0 fe80 :: / 64 teredo 256 2001 :: / 32 teredo 256 ff00 :: / 8 teredo 256 :: / 0 teredo 1 :: / 0 teredo 1024 :: / 0 teredo 1029 . . .

Importance : The host uses venet0 interface to accept all including localhost.

We can scan a particular port :

nmap -p 22 23.227.167.33 1 nmap - p 22 23.227.167.33

Output :

... PORT STATE SERVICE 22/tcp open ssh ... 1 2 3 4 . . . PORT STATE SERVICE 22 / tcp open ssh . . .

What version of softwares they use?

nmap -sV 23.227.167.33 1 nmap - sV 23.227.167.33

Some firewalls block ping requests, we can use TCP ACK and TCP Syn to scan remote hosts :

nmap -PS 23.227.167.33 1 nmap - PS 23.227.167.33

Output :

Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn Nmap done: 1 IP address (0 hosts up) scanned in 2.12 seconds 1 2 Note : Host seems down . If it is really up , but blocking our ping probes , try - Pn Nmap done : 1 IP address ( 0 hosts up ) scanned in 2.12 seconds

or :

Host is up (0.000013s latency). Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 1 2 3 4 5 6 Host is up ( 0.000013s latency ) . Not shown : 997 closed ports PORT STATE SERVICE 22 / tcp open ssh 80 / tcp open http 443 / tcp open https

There is Nmap Scripting Engine (NSE). Run :

sudo updatedb locate *.nse <pre> Usually the dir for *.nse is `/usr/share/nmap/scripts/`. `cd` to that dir & do ls: <pre> cd /usr/share/nmap/scripts/ ls 1 2 3 4 5 6 7 8 9 sudo updatedb locate * . nse < pre > Usually the dir for * . nse is ` / usr / share / nmap / scripts / ` . ` cd ` to that dir & do ls : < pre > cd / usr / share / nmap / scripts / ls

You’ll see bunch of scripts like :

acarsd-info.nse ike-version.nse ... auth-spoof.nse irc-brute.nse backorifice-brute.nse irc-info.nse backorifice-info.nse irc-sasl-brute.nse ... citrix-brute-xml.nse ms-sql-info.nse citrix-enum-apps.nse ms-sql-query.nse ... http-vuln-cve2015-1427.nse vnc-brute.nse http-vuln-cve2015-1635.nse vnc-info.nse http-vuln-misfortune-cookie.nse voldemort-info.nse http-vuln-wnr1000-creds.nse vuze-dht-info.nse http-waf-detect.nse wdb-version.nse ... http-wordpress-enum.nse wsdd-discover.nse http-wordpress-users.nse x11-access.nse ... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 acarsd - info . nse ike - version . nse . . . auth - spoof . nse irc - brute . nse backorifice - brute . nse irc - info . nse backorifice - info . nse irc - sasl - brute . nse . . . citrix - brute - xml . nse ms - sql - info . nse citrix - enum - apps . nse ms - sql - query . nse . . . http - vuln - cve2015 - 1427.nse vnc - brute . nse http - vuln - cve2015 - 1635.nse vnc - info . nse http - vuln - misfortune - cookie . nse voldemort - info . nse http - vuln - wnr1000 - creds . nse vuze - dht - info . nse http - waf - detect . nse wdb - version . nse . . . http - wordpress - enum . nse wsdd - discover . nse http - wordpress - users . nse x11 - access . nse . . .

I will run scan with http-wordpress-users.nse for my IP 23.227.167.33 :

nmap --script http-wordpress-users.nse 23.227.167.33 1 nmap -- script http - wordpress - users . nse 23.227.167.33

I can make it port specific and filter out errors :

nmap --script-args=unsafe=1 --http-wordpress-users.nse -p445 23.227.167.33 1 nmap -- script - args = unsafe = 1 -- http - wordpress - users . nse - p445 23.227.167.33

I can get help on the script :

nmap --script http-wordpress-users.nse 23.227.167.33 1 nmap -- script http - wordpress - users . nse 23.227.167.33

Here are useful resources, but I can give warranty, they are not for average user :

https://downloads.skullsecurity.org 1 https : / / downloads . skullsecurity . org

Hydra, Medusa and Ncrack

Commonly used passwords are available on security websites as text files. Take that such file’s name is passwords.txt . We stoped Fail2Ban (you’ll not do), use easy password (you’ll not do) to test and run this to test our quality of password, where root is username :

hydra -l root -P passwords.txt 23.227.167.33 ssh ncrack -p 22 --user root -P passwords.txt 23.227.167.33 medusa -u root -P passwords.txt -h 23.227.167.33 -M ssh 1 2 3 hydra - l root - P passwords . txt 23.227.167.33 ssh ncrack - p 22 -- user root - P passwords . txt 23.227.167.33 medusa - u root - P passwords . txt - h 23.227.167.33 - M ssh

5178 numbered password matched with our dump of 10000 passwords with ncrack most fast. We can make that thing more faster, that is different topic.

This is an example questionable person’s blog. Use Tor browser to read guides how to run genuine bad tools & commands for brute force :

hackersleaked dot blogspot dot com 1 hackersleaked dot blogspot dot com

Conclusion

Usually if logically these are tested with own interest and vulnerabilities closed, it is actually difficult for an novice script kiddie to intrude. On virtual server, it is more common to get knocked out by SSH brute force flood or have XML-RPC attack.

If there is no proper IPTables rules, Fail2Ban like basic security software configured, root user not changed, anyone virtually can get clear password and straightforwardly SSH into. It is not that dedicated servers (with sane hardware, from proper web host and sane number of traffic) costs huge, but managing dedicated really demands intelligence. As the titles tells the intention – Tools & Commands For Testing Brute Force Vulnerability (White Hat) , we are limited by ethics to show anything more. It does take time to crack Facebook account.

Tagged With

This Article Has Been Shared 446 Times! Pinterest

About Abhishek Ghosh Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.