Quantcast
Channel: WeakNet Labs
Viewing all 38 articles
Browse latest View live

Content Migration

$
0
0
I will be moving all WeakNet Laboratories content back to blogger.com. Thank you for your support and patience during the migration process.

 1
2
3
4
5
6
7
8
9
10
11
#include<stdio.h>
voidmyFunction(inti);// function prototype
intmain(void){
intj=0;
myFunction(j);
return0;
}
voidmyFunction(inti){// (i) is copied onto the stack with the function here
printf("%d\n",i);
return;
}

The sauce above has been "beautified" by http://hilite.me/

Cracking WPA2 From Scratch

$
0
0

Introduction

Before we begin, let's take a look at how the process of WPA2 encryption works. I feel this is a very necessary step for this advanced subject. How could we possibly begin to write an application to crack wpa2 if we have no idea how the protocol/authentication methods work? Also, I would like to note that I do realize that this is incredibly absurd to use the system administration tool Perl to do this, since it is quite slow in comparison to C programming for these heavy lifting tasks (we will see why later), but it is still a good exercise to get familiar with the actual WPA2 cracking process for those already familiar with Perl.

Requirements

A packet capture file containing a WPA2 4-way handshake, and a single beacon frame from the AP - This is for simply viewing the values using a binary to hex tool for network packets, such as Wireshark while coding your own tool with this article. I will be using Wireshark for a few examples and I also have prepared my own 4-way+1 beacon packet capture file that you can download here. To use the code that I write, you will need a few Perl modules:

Terms Used

  • Symmetric Key Algorithm or SKA - Cryptography method which uses identical keys to encrypt plain text data and decrypt cipher, or encrypted text.
  • Pre-Shared Key - The key, or WPA2 password, used for the SKA process.
  • EAP, or Extensible authentication Protocol - the actual protocol for transporting WPA2 encrypted data (not to be confused with other protocols, such as 802.11)
  • Pairwise Master Key (PMK) - a string derived using the EAP framework which is used in the process of creating the PTK
  • Pairwise Transient Key, or PTK -
  • Message Integrity Code, or MIC - a checksum that is used to authenticate an encrypted message. It is often used as "MAC" for "Message Authentication Code" but since we already use MAC in computer communications to mean the hardware address of a radio, we use MIC.
  • MAC Address - 6 byte, unique, network hardware address, e.g. "01:23:45:67:89:01".
  • BSSID or Basic Service Set Identifier, MAC address of the AP radio.
  • ESSID or Extended Service Set Identifier, Network name, e.g. "Free WiFi", or "linksys".
  • Nonce - random number used for initiating an encrypted communication.
  • "Station" - refers to a wireless client on the BSS.
  • "AP" Access Point - refers to the actual wireless access point or router.
  • Radio - used synonymously with WiFi adapter or Network Interface Card, or NIC for short.
  • RFMON or Radio Frequency Monitor Mode - Passive listening to 802.11 traffic with a special driver for the radio.
  • Handshake - an authentication process used by parties wishing to communicate using encryption to protect the transmitted data.

Trolling for APs

If you analyze a packet capture file of 802.11 packets, you may see your client sending out "probe request" packets. These request packets are to stimulate nearby APs into sending out information such as the router/AP capabilities and name. The router's response will be a packet known as a "probe response." This is generally how all devices including our phones and tablets search for nearby WiFi access points. This type of "scanning," or "trolling" in the case of noisy-wardriving phones and tablets, for APs is sometimes referred to as "active scanning." it does not require a client radio to be in "monitor mode" or RFMON mode. If we have a radio whose driver supports RFMON, then we are able to "passively" scan for APs (and any other 802.11 traffic on any of the frequencies (one at a time, except when bleeding or overlapping naturally occurs) supported by the device). The most abundant frame is usually the beacon, which by default can be sent out of the AP around 10 times per second. This frame has all of the APs capability and identity information. Since in "passive" scanning the radio is only listening, not sending, these frames are easily acquired.

Open System Authentication

When a client station wants to connect to an access point, e.g. when we select it in our supplicant software or tap on the network name on our phone screens to connect, it first goes through the process of authentication which is often open system authentication, or OSA. OSA is a four-way handshake style process that must be completed before we go further. This process has often been compared to simply plugging a device into a wired network, e.g. the actual action of pushing the Ethernet cable into the laptop and the network port or switch.

  1. Station --> Authentication Request --> AP
  2. AP --> Authentication Response --> Station.

Each one of these is a single unique 802.11 packet. This is where MAC address filtering is used. If the AP is set up to only allow certain MAC addresses of clients, which is a poor method of securing the network and should not be used alone, and the MAC address of the system or station which initiated the process is not in the AP's "white-list" the station is then rejected from the authentication process.

System Association

To finally "associate" the station system with the network/AP the station initiates an association by sending the AP an "association request." The AP then updates a few tables, allocates resources (similar to starting up a program in a computer, the AP actually makes memory space for things for the station), and synchronizes with the station finishing the association process. This is, of course, if the AP accepts the station as a client. Below are the steps involved.

  1. Station --> Association Request --> AP
  2. AP --> Association Response --> Station.

Pairwise Master Key (PMK)

The station already knows the PMK, or Pairwise Master Key value. This is pre-calculated by the station supplicant software using the following algorithm, PBKDF2(SHA1,4096,SALT_LEN,OUTPUT_LEN) where the SHA1 means that we are using the SHA1 cryptographic hash function. The number 4096 means that we are running the PBKDF2() function 4096 times for "key stretching" which makes the process of offline-brute-force cracking of the WPA2 passphrase that much harder. The SALT_LEN refers to the salt length of the encryption function, which is the length of the network name, since the network name, or ESSID, is used as the salt. The OUTPUT_LEN refers to the how long we want the output string to be in bytes. Here is an example PMK directly from the pages of my book, 9051BA43660CAEC7A909FBBE6B91E4685F1457B5A2E23660D728AFBD2C7ABFBA Now that the station and the AP know the PMK, we can move on to the next step, the 4-way handshake.

WPA2 4 Way Handshake

You may have heard of this "4-way handshake" process before, if you have ever used the Aircrack-NG suite of 802.11 penetration testing tools. This process starts with the AP creating a string, called an A-nonce, which stands for "AP Nonce." The animation below shows how to view the A-nonce in Wireshark using the capture packet file I offer in the beginning of this article.



Okay, let's get our hands dirty. This is going to be complicated so maybe we should use a writing pad and take some notes? :) The A-nonce is first sent to the Station by the AP. The Station uses the PMK to calculate the Pairwise Transient Key, or PTK. This is done using a Pseudo-Random Function, or PRF. The PRF loops over a simple integer variable, let's call it $i for the time being (i is commonly used in for() loop examples), starting at $i = 0, and stopping when $i == 3 - so four times total. During each loop, a new string is constructed by concatenating the hexadecimal byte value of the string "Pairwise key expansion \0\0" - which is

 "5061697277697365206b657920657870616e73696f6e00"

 and sometimes just referred to as PKE in technical documentation, both of the MAC addresses for the station radio and the AP radio, the A-nonce and the S-nonce, a zero "0", and finally

$i+PKE+MAC0+MAC1+ANONCE+SNONCE+0+$i+PKE+MAC0+MAC1+ANONCE+SNONCE+0+$i+PKE+MAC0+MAC1+ANONCE+SNONCE+0+$i+PKE+MAC0+MAC1+ANONCE+SNONCE+0+$i

The "Pairwise key expansion \0\0" string is actually part of the IEEE 802.11i-2004. It literally is a string with two null bytes at the end of it. We encoded it into hex by taking the case-sensitive ASCII values of each letter in decimal and calculating their individual hexadecimal values. For example, 80 is the ASCII (decimal) value for the capital "P" and 97 is the ASCII (decimal) value for "a" which are the first two letters of our string. So we first calculate the hexadecimal value for these two numbers, which in base 16 become, 50 and 61 respectively. Notice the first two bytes of the string, "5061697277697365206b657920657870616e73696f6e00", are 50 and 61? We do this for the entire string including the two null bytes at the end, which we simply denote using a single 0 for each.

To make this even more complex, the order in which all of these values are concatenated, matters! In the string above, we actually have to use the MAC address (station or AP) that is lowest in hexadecimal value first, and same goes for the nonce values. The nonce which is lowest in hexadecimal value first in our string as well. Before the string becomes part of the PTK, is is packed using the pack() Perl function and sent into the HMAC_SHA1() function along with the PMK string that acts as a "key." The value returned from the HMAC_SHA() function is then concatenated to an empty string, let's call it $ptkGen. As $i increments to 1, the process starts over and the final result of the new iteration is then appended to the value in $ptkGen (itself). After all 4 iterations are complete, The PTK is then completely calculated as four concatenated strings into $ptkGen by the station. (Well, not really, I am sure the AP doesn't use Perl. We do for this exercise). Next, the station sends the AP the S-nonce and the Message Integrity Check or MIC value. This MIC value is what we will finally use to crack the PSK. Below is an animation I made to show how to check an MIC in the 4-way handshake by hand using Wireshark.



Aircrack-NG and our Perl code only really needs two of the 4 packets in a four-way handshake. This is because the first two packets have both the A-Nonce and S-Nonce values in them AND the MIC. The second two packets also have the same information, just different values. We cannot, however, crack the key with just packets 2 and 4, or 1 and 3. The MIC is the "key" to our treasure, so to speak. This means that for each word in our dictionary file, we are going to go through this entire process over-and-over calculating a new PMK and PTK, hash the message body of the (captured) transmitted packet and check the MIC value. If the MIC value that we have calculated matches that in the 802.11 packet, then we have used the correct PSK in the process and thus know the secret password to the network. Heavy lifting for Perl! The message body can be obtained from the packet using the following line of Perl,


1
$msg=unpack("H*",substr($pkt,60,121)); 


This is the 60th to the 121st bytes in the packet using the packet's very first byte as an offset. We assign the message body to $msg. The message is what we finally hash using the PTK to calculate the MIC.

First, need to take out the MIC from the message body. By "take out" we need to actually "zero-out" the MIC, and we do so with the Perl substitution operator with the following 2 lines,

my$pad="0"x32;# 16 null bytes for padding 
$msg=~s/$mic/$pad/i;# remove the WPA2 MIC value string

This is two lines of code, just so we don't have a single line with 55 "0" characters in length, not including the comment. We will, once again, be using the HMAC_SHA1() function from the Digest::HMAC_SHA1 Perl module to check the MIC with our PTK. We do so by passing it the (packed up) value of the message body, $msg and the first 32 bytes of the (packed up) PTK, $ptk like so:



1
my$digest=hmac_sha1(pack("H*",$msg),pack("H*",substr(unpack("H*",$ptk),0,32))); 

Now, we check the sub-string of bytes 1 through 16 of the digest, $digest, with that of the MIC, $mic, like so: if(substr(unpack("H*",$digest),1,16) eq substr($mic,1,16)){  print "PTK: ",unpack("H*",$ptk),"\n";  print "\n\n\tKEY FOUND: [ ",$psk," ] \n\n";  exit; # we are done } And that is all I did to create a simple brute-force tool, like (but not as efficient as the (oh the beautiful language of C <3 aircrack-ng.="" nbsp="" p="">
Below is the entire PoC that was used in my incredibly boring book, Penetration Testing with Perl. I have added lots of comments, and for those who have read all the way through this text (or simply understand how encrypted communication works), this should not resemble "write-only" code.

3>

Conclusion

This is a proof of concept. Stimulating and picking apart the 802.11 transactions with Wireshark is recommended and my WEAKERTHAN Linux distribution has all of the necessary tools to do so. By "stimulating," I simply mean, using Aircrack-NG's Aireplay-NG to de-autheticate a client causing it to re-authenticate using the 4-way handshake process described above. We do this because if we do, in fact, crack the PSK, or WPA2 passphrase, we can de-crypt the traffic using Wireshark- if and only if (to my knowledge at least) this 4-way handshake is in the packet trace.

WEAKERTHAN Linux 6 BETA 2 Release

$
0
0

WEAKERTHAN Linux 6 BETA 2

As promised, WT6 BETA 2 is now available to the public! You can download a copy from my own personal server (80211.ninja) from the Weakerthan Page in this weblog.

Screenshot of Weakerthan 6 BETA 2
Weakerthan 6 BETA 1 screenshot

Weakerthan BETA 1 screenshot
Please, if you test the ISO and have any suggestions, recommendations for features, etc, let me know! Email me, or reply directly to this post! Below are some features and development updates,
  • Added VirtualBox Guest installation for drivers (click to drag to change screen  resolution!)
  • Went a little top-heavy on the Reverse Engineering/Programmer setup (inspired by the work of ro0ted :) His/Her tutorials are awesome! 
  • Added Vim themes and customized the Vim Run-time for NASM/Assembly
  • Customized my own Fluxbox theme, icons, wbar, and wallpapers
  • Removed custom Linux (kernel) for ease of use for newcomers to Linux
  • Compiled from source almost all penetration testing tools and debugging software
  • Created my own UX/UI applications for Fluxbox
  • Created my own Fluxbox menu and set Gnome-Terminal as preferred console - Also added functionality to change wallpaper directly from the Fluxbox menu
  • Customized and updated all of my own penetration testing softwares including WARCARRIER, WifiCake-NG, and the pWeb web application penetration testing suite
These are mostly UX/UI customization and work. Also, please keep in mid when suggestion tools to be added, that with open source software a lot of preexisting tools may already do what you are looking for, just from a different perspective (the terminal) :)

Facebook

I recently just hit 1,000 likes on Facebook! Be sure to click on the Facebook page link on the right sidebar! Thank you all, I love you!!!

Penetration Testing with Perl

I was recently made aware that David Farrell from Perl Tricks is reading my book Penetration Testing with Perl, and writing the code as he goes along (while refactoring, and probably making it more readable). So, if you cannot afford the publisher's ridiculous prices, you can still download all the code from his GitHUB page! Thank you David!

P vs. NP Problem

$
0
0
I was reading through an amusing article that I found while browsing my Twitter feed and stumbled upon a simple problem, and that is to programmatically (and efficiently) find two numbers whose product (multiplication) equals 119. The author states that we cannot use 1, or 119, and which means that we are dealing with a non-deterministic polynomial problem ("easy to verify, but hard to solve").

Well, why can't we make the solve part easy too?

Now, the author's explanation of the problem may not have been sufficient, as I know nothing about the P vs. NP problem, but I did instantly recognize something while reading it; it's actually a simply problem to tackle, if you know where to look!

The author then goes on to say "you probably have to go through all possible numbers from 2 to 118". <--- That line was the breaking point for my concentration. I thought that "there's no way you have to go through that many iterations for this application. That's absurd!" I instantly grabbed a pen and some paper and after a few minutes I was already typing out the C source code in a Vim which defies that. The way I did it was to take the tiny sequential steps and drop a lot of them and then make the remaining steps taller (so-to-speak).

Dyslexia

We read our text here in the the US, from left to right. We read our numbers from right to left! Yeah, that's right, we evaluate the columns starting with the least significant column, (the ones column for integers)! Anyways, the least significant column is the one which holds the most clues about a number, obviously. For instance, numbers that end in 2, 4, 6, 8 are all divisible by two. Well, if the number given in the article was 118, we could have instantly said 2 * 29 and been done with it, since that's neither 1 nor 118. Also, if the least significant column is a 5 or 0, assuming there is a tens column value for the latter, they are both divisible by 5. Well, that leaves us with 1,3,7, and 9. But wait a minute, the author says we cannot use 1. So now we are down to 3, 7, and 9!

Well if the number is not divisible by those, we increment each by 10 (becoming 13, 17, and 19) and try again. We repeat this ONLY until we get halfway up the stair case. Yeah, that's right, I just dropped even more sequential steps (half of them) from the solution the author provided. Why I do this may be obvious. If we look at numbers that are divisible by other numbers, they are never divisible by numbers higher than half of their own value. For instance 1336 is divisible by 2 which equals 668. It has no factor larger than that. Same goes for 10. 10 is divisible by 1,2, and 5, but nothing above five.

C Programming

So, how does this translate into an algorithm and source code? Well, I did it in C programming, but added a massive amount of comments on the way through the code. I also broke the source code up into functions without any global variables so that I could easily explain what each does here in this weblog.



The first function outside of main() is void checkType(char *ct); This function simply deduces what kind of mathematics will be used on the entire number. It gathers this information by simply using the least significant value, or value in the ones column. I use the modulo function in C after converting the input as an integer. This gathers the last digit into the integer symbol, ictm, named for "integer check type modulo". If ictm equals 5 or 0, or 2,4,6, or 8, we process it with the function void processEasy(int ict,int even);

This returns the value to the user and exits instantly. That means that we can instantly calculate any integer value whose least significant (ones place) value is 0,2,4,5,6 and 8. No (mathematical) verification needs done at all. That only leaves us with 1,3,7, and 9. So how many values are there that end with these four numbers "from 2 to 118" in the context of the article author's example? Well, 46 to be exact. I know this because I modified the code to output the number when sent into the void processHard(int ict) function that I made. This function is for handling odd (least significant) numbers that aren't 1,5, or 0. That's 46 out of 117. That means that I only have to mathematically verify about 39% of the numbers. That's not too shabby.

Well, I begin with three simple calculations, for modulo, if(ict%3==0), if(ict%7==0), and finally if(ict%9==0). Well, guess what? The second calculation got his number, 119! That means I only performed 2 verification calculations for this sum! That's about 1.7% of his "from 2 to 118" method! Bingo? No bingo. No why? Because prime numbers, that's why.

Yeah, those damned things. Well, I compensated for that by letting the application go off into a while() loop into the void processInsane(int ict); function. This function is pretty cool because it performs a simple stack-oriented (pemdas-like) POSTFIX inline with the modulo function in C. There were 26 prime numbers between 2 and 118. That's only 26 calls to the heavy-lifting void processInsane(int ict); subroutine. 26 is 21% of 119. Not too shabby? That's just over one-fifth of the "verification" required for numbers 2-118.

~Douglas

WEAKERTHAN 6 BETA rc7.8 Released!

$
0
0
Weakerthan Linux 6 - Updated Screenshot!

WEAKERTHAN Linux 6 BETA rc7.8

Changes:


  1. Google Chrome replaces Firefox Developer Edition.
      • Incognito mode and regular mode both ran as user "weaknet".
      • Information Security and developer themed plugins installed (many!).
      • Added TOR proxy into FoxyProxy Chrome extension for those who asked
  2. WBAR updated.
  3. Google Chrome icon created.
  4. XDM Theme completed (Still not installed by default).
  5. Updated Metsaploit-Framework to bleeding edge.
  6. Updated SET Framework to bleeding edge.
  7. Added customary "Thank you!!" application and a FREE copy of my song "1985" from my album "Unsolved Mysteries"!
  8. Added alsamixer/als-utils, sox and libsox-fmt-mp3 for music playing.
  9. Added volume icon (back) into WBAR dock.

  10. Tools Added (as per request)


    1. Constantine's Tools: http://constantine.sourceforge.net/
    2. Ufonet (DDoS Tool): https://ufonet.03c8.net/
    3. CryptDisk compiled and installed.
    4. TOR instant support from FoxyProxy and a I coded  new TOR script "torcheck"

    Tools Added

    1. Tor Script updated and Privoxy setting for Tor added to Google Chrome.
    2. PixieWPS: https://github.com/wiire/pixiewps
    3. Crunch and new Password Utilities Sub-menu, Generators
    4. Coded new cleanup utility, added to Fluxbox menu

    To Do

    1. Recover old Conky settings from dead WARCARRIER OS drive.
    Got any other suggestions? :) Send them over the Weakerthan page!

    ~Douglas

    WEAKERTHAN Linux 6 rc7.9 Update!

    $
    0
    0
    Weakerthan Linux 6 rc7.9 Update Screenshot

    Updates

    I have updated a lot of stuff , fixed the PostGRESQL issue, added new themes that I made a while back from WarcarrierOS, added some new wallpapers that I made, changed some of the UX/UI stuff in Fluxbox, updated the Fluxbox menu and fixed a few BUGs including the isse with the temp files cleanup utility that I coded.

    Have fun with this one!

    Download



    SpinnyB Wallpaper

    $
    0
    0
    As a simple throw-back post, I'd like to share a wallpaper that I have designed that showcases my very own Spinny Blue Box design. This is the newest default wallpaper in next RC release of Weakerthan Linux 6.

    Throwback to my old SpinnyB. Click this image for a higher resolution and for full resolution click the link below to my indexed images.

    My Images directory is now indexable BTW in case anyone needs any of my images: https://weaknetlabs.com/images/

    Thanks,
    ~Douglas

    BlizzyB Wallpaper Art

    $
    0
    0
    I have created a new artistic rendition of the BlizzyB!

    The BlizzyB Wallpaper click for higher resolution, click below for full resolution!


    Click on the image to see a larger version and you can download the 1920x1280 version at http://weaknetlabs.com/images/

    ~Douglas

    WEAKERTHAN Linux 6 RC7.22 ISO

    $
    0
    0

    DARK 

    Dark, darkness, deep, cave-like hacker dark, dark, and more darken darkness in WEAKERTHAN Linux 6 than you have ever seen! I mean, Laurel Caverns can't even come close. This Linux is so dark and flat that it will keep your eyes glued to the beautiful screen while hacking the planet.

    I got some feedback about how the darker themes in WT6 where preferred. I want Weakerthan Linux 6 to be your preferred penetration testing ISO over any other. I want WT6 to be slim, sleek, fast, and sexy. I have minimal-ized and flattened images and themes to keep them tiny. So, please, pretty please keep emailing me the comments and suggestions! Or just post them here! Thank you all for the feedback so far!


    Chrome Tools

    I have fully tested and added/removed more tools for web application penetration testing into Google Chrome. In fact, I have also added some experimental hacking features and even dark themes for not only web pages (I mean ALL web pages will be dark like you see in the Wikipedia.org screenshot above), but even a dark theme to the developer tools! You can easily dsiable this if it is not working correctly by hitting this button in the browser bar:

     I also fixed the issue about downloading files to the /root/Downloads directory by simply making the /home/weaknet/Downloads file a symbolic link to it and made it writable by the user "weaknet". This allows me to run Chrome a s a non-root user in the /root directory transparently. If you'd like to see some great videos on web penetration testing using Google Chrome in WEAKERTHAN Linux 6, please check out the YouTube playlist I made for the Capture the Flag challenge (2) offered by InfosecInstitute.com


    Application Optimizations

    I have optimized almost all GUI applications to use the sexy Ubuntu font. I honestly have to say, that after all the years that I used Ubuntu, the only things that truly were memorable about it was Googling for error strings and the sexy font. So, in WT6 I have taken all of the Googling guesswork and troubleshooting out for you, and added the only thing that Ubuntu could make right; the font. I have darkened editors, debuggers, and even as you see above - Wireshark. So yeah, I have squashed a boat-load of (behind the scenes) bugs since the last release candidate!

    I have also added all of your suggestions for tools and added a few of my own as well. So take some time to browse through the Fluxbox menu that I made to check them out! I added G0tmi1k's Metasploit Payload Creator application. Also the Penetration Tester's Framework is now installed by default, and the configuration is set to install the tools into /pwnt/ptf/tools/ so you can easily install any tools that you need using that tool!

    ART

    I am an artist. I have been since I was a child. In fact, I was just hired to illustrate a book! So, these updates will become less... #beastmode in nature. At least for a month or two. Which, now that I am thinking of it, also pushes the enrollment date back for WeakNet Academy. Sorry, I couldn't turn the offer down. Anyways, please check out the different Fluxbox themes that I made and the wallpaper selection as well.

    DOWNLOAD

    Here are the links to download the newest ISO. I will be removing the old ISOs from the local 80211.ninja repository to replace them with this.

    ISO: wt6_beta_07222015.iso
    MD5: wt6_beta_07222015.iso.md5

    Thank you!

    Thank you for trying WEAKERTHAN Linux. It's been 8 long years of WeakNet Labs to come to this project and I feel like it's the best thing that I have put together since then. Thank you all for following me on sites, sending emails, comments, tweets, etc.

    How's that for a weekly update? :)
    ~Douglas

    WEAKERTHAN Linux 6 BETA rc8.17 Released!

    $
    0
    0



    Updates

    You spoke and I have listened.. again! :)

    • Added WiFi Drivers
    • More tools and domain hacking tools as per requests
    • UI/UX changes as per requests

    Download

    ISO file (1644650496 bytes) wt6_beta_08172015.iso
    MD5 file (56 bytes) wt6_beta_08172015.iso.md5


    I will be removing the older RC files today. Thanks for choosing WT6 and PLEASE submit comments, advice, suggestions, etc! This ISO is for YOU after all! :)

    Networking with VirtualBox and Multiple VMs

    $
    0
    0

    Introduction

    Recently, I became aware of a new CTF (Capture the Flag)-style vulnerable VM image from OWASP by +g0t Milk and +VulnHub :

    To say the least, I have been captivated by Capture -the- Flag hacking games since my first experience with Infosec Institute. In fact, I won bounties -- (twice)  just from hacking, so that should be an incentive for any of you to try the sport!! :)

    So, it turns out that Weakerthan Linux proves to be a good tool for CTF as shown in the playlist of videos I made for InfosecInstitute.com:


    And another from a TopHatSec Freshly OVA Challenge were I actually get a root shell :D


    Not only does CTF a great way to make some cash, but more importantly, it's a great way to practice, and learn penetration testing skills for not only web applications, but also OS and networking thanks to the capabilities of virtualization software. Once you have honed your skill, you might want to consider become an actual bounty hunter:

    Tutorial

    In this tutorial, I will be walking us through the process of using Weakerthan Linux 6 as an attacker VM (Virtual Machine) and the OWASP Broken Web Application Project VM as the victim. In the past, I have found the documentation on getting multiple VMs to communicate with each other rather confusing from many sources. This guide can be used to set up any victim guest system, and a great place to find them is at VulnHUB. To tell you the truth, I am not a fan of Oracle's VirtualBox, but most of my software/Linux user's seem to use it. My goal is to have you ready within a few short minutes of reading through, with a lab-like environment for practicing penetration testing.

    This tutorial may seem like tl;dr, so I tried my best to take good screenshots that we can simply read from without having to actually read the descriptions or my text for anyone who is impatient.All command line i/o will be monospace, all links will open in a new windows/tabs, and all screenshots can be clicked to view larger/full sizes.

    Begin

    First, grab a copy of Weakerthan Linux (current) and a copy of the OWASP BWA Project image. Extract the OWASP BWA image using any extraction tool, such as Peazip for Microsoft Windows by right clicking on it and extracting to a new folder.

    Setup VM Disk and CPU

    Open VirtualBox and add the image by clicking on the NEW button at the top left as shown in the image below.


    Next, choose a name for the image that will be displayed in Oracle's VirtualBox Management window. Choose Linux, and Debian (or Ubuntu) 32bit. This is a generic i686 32bit kernel with PAE, so we will need to set up PAE in the CPU settings later. The screenshot below shows the naming and system type to choose.


    Next, choose how much RAM you want the machine to have access to. Since this is a PAE 32 bit kernel, we can choose over 4GB of RAM if we really want to. Though the web server does have Tomcat and Java installed, it actually doesn't require that much RAM. In the screenshot below, I simply chose 1GB (1024 bytes).

     
    Then we choose an existing hard disk and browse to the extracted OWASP BWA image and select the first choice, "-cl1" as shown in the screenshot below,


    Finally, we need to setup the processor after clicking "Create" in the screenshot above. Right click on the machine in the VirtualBox Management window on the new VM and click "settings". Then, click on "System" and then the "Processor" tab. Make sure the "Enable PAE/NX" box is checked, as shown in the screenshot below, and now we can move on to networking.


    Networking

    Networking two VMs is quite simple. In my setup, I enable two network adapter devices in Weakerthan Linux, one for a virtual-host connection to the victim, and another for a NAT connection to the internet, in case I need to update any tools as I am hacking. In the victim machine, which we will setup first, I have a single connection to other virtual hosts. When we click on the "Network" item in the left side, for the OWASP BWA image, we only use a single adapter, and choose "Host-only Adapter", "Allow All" for Promiscuous Mode, and then click "OK" as shown in the screenshot below.


    We are now done configuring the victim VM. Now, we need to setup Weakerthan. We can do all of the same steps, with exception to adding PAE to the CPU and selecting the ISO instead of the VM disk image. When we finally get to the "Network" item in the left side and set up the first adapter to be the "Host-only Adapter," just as we did for the OWASP BWA victim VM as shown in the screenshot below,


    Next, click on the "Adapter 2" tab at the top and check the "Enable Network Adapter" box and leave it as a NAT device as shown in the screenshot below.


    Now we are done setting up our environment. Start up both VMs and wait until the OWASP BWA terminal outputs IP information as shown in the screenshot below,


    Since our victim OWASP BWA VM device adapter is a "Host-only Adapter" it cannot be accessed directly from machines that are not within the virtual network according to Oracle - "cannot talk to the world outside the host since they are not connected to a physical networking interface" We should, however, heed the warning stated in the VM and not leave the machine on while not in use!

    in the Weakerthan Linux VM, start up the web browser from the dock icon and browse to the OWASP BWA environment as stated in the terminal window. In my case, it's "http://10.0.2.15/" as shown in the screenshot below,


    NOTE: The Weakethan Linux ISO will only be able to talk to the Host machine and any other guest VMs that are within the virtual network until we "turn on" the second network adapter. The one we established as NAT in the Network section of Settings. To turn the second adapter on, open a terminal and type,

    ifconfig

    This will display the network devices already "turned on" or enabled.


    In my case, I have "lo" and "eth0" to show all devices, add the "-a" argument to ifconfig,

    ifconfig -a

    My second device is shown as "eth1". This is the NAT adapter that will have access to the internet. To enable it, we can use WICd, a graphical tool, or simply do,

    dhclient eth1

    from the command line. We should now have a full network setup for both devices in our virtual lab environment!

    Conclusion

    If you come into any errors or have any suggestions or comments, I will gladly update this tutorial. Leave a comment or email me directly! Again, this is not just a game, you actually learn information security practices and penetration testing skills from CTF. Oh, and you can also win money! My next post will most likely be a new playlist of tutorial videos for hacking this VM image. I am trying to not have any duplicates of hacking particular vulnerabilities, so I will skip over a few that I have done in the previous CTF playlists.

    ~Douglas

    Weakerthan Linux 6 Updates!

    $
    0
    0


    Ask, and ye shall receive!

    Well, I recently read that "the bar for penetration testing distributions was just raised" so I figured I should step it up a notch and just add everything you guys have requested and more. I even went so far as to create a new icon for Armitage,








    1. Bettercap
    2. Browser Exploitation Framework
    3. Exploit-database
    4. Google Chrome - updates, plugins, and menu for Disabling XSS Auditor
      1. EFF Privacy Badger Plugin Added
        1. Been using this for a while now and am a big fan! :)
      2. Browser UI Experiments enabled and Zero Dark Matrix UI theme for Developer Tools added

    1. Fang md5 cracker
    2. CredCrack
    3. Updated all GIT tools and Debian system upgraded
    4. Added Armitage && Armitage icon to the dock for quick access
    5. FluxBox menu reconfigured and rearranged
      1. I kept the installer out of the main menu for a reason; it stays there when you install the OS and is annoying
    The Fluxbox menu can be edited easily right from the menu itself. Just click Personalization->Customize WT6->Fluxbox Customization->Fluxbox Menu












    This is no longer BETA. I will release fresh ISOs each month from now on, so please check back for updates! We are now starting with WT6.8.2


    Thank you!

    I hope you enjoy! 
    ~Douglas

    Blackberry and Security

    $
    0
    0

    I recently found a nasty SQL Injection bug that enabled me to view personal information of Blackberry's customers and employees that was quite similar to the simple hack that Weev was incarcerated for. Rather than dump the data, or write a script to hammer away at it, I disclosed the bug and Blackberry gave me credit for it:

    http://ca.blackberry.com/enterprise/products/incident-response-team.html


    I have made similar disclosures in the past to other companies, all of which didn't even seem to care about the bugs. Blackberry's incident response team, however promptly emailed me and kept up to communication throughout the process,

    [BIRT2015-00446] Vulnerability Report

    Hi Douglas,
    Hope you are doing well. I'm happy to report the issue you reported to BlackBerry Security has been resolved. BlackBerry Security appreciates you responsibly disclosing this issue to us. On our external website, we list researchers that report security issues under our acknowledgments section, http://ca.blackberry.com/enterprise/products/incident-response-team.html If you would like to have your name added, and it has not already been listed once this calendar year, please send me the name and either Twitter or company name you would like added. As per BlackBerry Security Response's policy, you will see your name posted on our website for the last Friday of the month.

    Thanks again for responsibly disclosing this issue.
    BlackBerry Security Response

    I have always been a big fan of Blackberry. If you're a fan too, you can check out my design gallery of Blackberry wallpapers!

    ~Douglas

    September Weakerthan Linux 6 Update Release

    $
    0
    0

    September is Here!

    Updates to Weakerthan Linux 6


    GoTTY - Added for Red Team/Terminal sharing during penetration testing
    GeoTweet - Added for Social Engineering / OSINT
    VLC - Compiled and added to easily play media files
    Transmute - added for word list generation for Aircrack-NG, cowpatty, John the Ripper, etc
    UX - The UX has been upgraded after lots of testing
    menu fixes - fixed issues from submissions
    OSINT submenu for Open Source Intelligence tools
    Red team submenu - with GoTTY and Armitage
    Sounds - Added sounds to the keyboard shortcuts
    Help! added to the menu with a lot of simple descriptions,

    Keyboard Shortcuts

    • Google Chrome - CTRL+ALT+g
    • Terminal - CTRL+ALT+t (or ALT+F1)
    • Wireshark - CTRL+ALT+w
    • Armitage - CTRL+ALT+a
    • MSFconsole - CTRL+ALT+e
    • Network Interfaces - CTRL+ALT+i
    • Network Manager (WiCd) - CTRL+ALT+n
    • Power options - Windows key+p
    • Logout of Fluxbox - Windows key+l (or ALT+CTRL+Backspace)

    Stage Fright!


    I added the Android "Stage Fright" exploit and its dependencies as soon as it became available. Check the screenshot below,




    Desktop Icons!

    I have added iDesk for desktop icons in Fluxbox. You can access them from the menu Personalization->Customize WT6->Show Desktop Icons. Check out the screenshots below,



    Download

    You can download the ISO update directly from my 80211.ninja server,

    ISO Image: (1.7GB) wt6.09.14.iso
    MD5 Checksum: (49 Bytes) wt6.09.14.iso.md5

    October Weakerthan Linux 6 Update Release

    $
    0
    0

    Happy Halloween!! 




    Additions to the ISO (Why it's bigger in size)


    My New Tools and My New GitHUB

    I have finally updated my GitHUB page since the Google Code migration. https://github.com/weaknetlabs

    Web Application Penetration Testing

    ss-6271 Shell Shock Exploit Script and WPES WeakNet PHP Post Exploitation Shell/Script. Both projects can be found here:

    SS-6271 Shell Shock Script coded and added to menu (https://github.com/weaknetlabs/ss-6271)
    WPES WeakNet PHP Post-Exploitation Shell/Script (https://github.com/weaknetlabs/wpes)

    I am trying my best to get an environment set up to test/create a video presentation of both. Here is a video showing off the Shell Shock Script:


    New RF Utilities

    I have also added 3 new RF Utilities that I made while writing my book Penetration Testing with Perl - DevList, 80211Sniff, and ChannelSet. These tools were written only using Perl and can be found under Penetration Testing->Network Utilities->RF Utilities->WeakNet Labs

    Warcarrier Updated!




    Warcarrier is now Warcarrier-ng and has been updated to the latest version. The latest version has a newer interface with a lot more functionality. The GitHUB repo for Warcarrier and more information can be found here: https://github.com/weaknetlabs/warcarrier To start Warcarrier, you will need a GPS USB device, I recommend the old GlobalSat BU-353 (because it works) http://usglobalsat.com/p-688-bu-353-s4.aspx, an 80211 network adapter which supports RFMON mode, I recommend anything made by Atheros/Qualcomm or if you really have to the ALFA 1W USB thing, and optionally you can use a USB Bluetooth dongle and the HackRF Ubertooth One for 802.15 spectrum analysis.

    Download

    ISO: (2260709376 bytes) Download Link
    MD5: (49 bytes) Download Link

    Thanks

    So, each time I update the ISO, the updates get bigger and better. This is no exception as you can see from the unordered list above. I have provided links to the tools pages for those unfamiliar with them. I got no recommendations this time around so I just put in tools that I felt that I would use on a daily basis while penetration testing. I hope that you enjoy the shiny new ISO file! If you like the ISO and my work, please consider donating as every little bit helps! 

    ~Douglas

    WEAKERTHAN Linux 6 December (Final) Update

    $
    0
    0
    This will be the final version of Weakerthan Linux 6 as next year will be the debut of 7. Thank you all for your support over the last 6 months! This was an awesome project! The lack of updates in November is due solely to trying to finish up my very first course at WeakNet Academy, Assembly Programming (x86) with NASM, which I hope to be available in early January of next year, (next month).



    This is the best Weakerthan Linux 6 to date. The tools have been updated, all requested tools were added, and the ISO is seemingly the same size as before!



    Built-In Netflix Support!


    Some UX changes to Weakerthan Linux 6

    Mostly all changes are to applications this time around, but I did throw in a few UX changes as well.

    • Added a button to refresh the dock into the dock itself, so resizing the window/resolution issue is "resolved"
    • Changed Google-Chrome BETA (default browser) to Vivaldi browser as seen in the first screenshot above.
    • NETFLIX support! 
    Download the ISO

    ISO (2.1GB) - Download Here
    MD5 (48 B) - Download Here

    Enjoy!
    ~Douglas

    Introducing WeakNet Academy!

    $
    0
    0


    Introducing WeakNet Academy!! https://weaknetlabs.org

    I have opened registration for my first course - Assembly Programming with NASM (x86). This was a very huge undertaking for me and my biggest project so far.

    The registration for "server-lifetime" access is only $25USD, but you get access to 15 videos that total over 3 hours of complete, in-depth demonstrations in topics like programming, memory management, and hacking. You also get online access to the complete course which is approximately 45 pages that include 14 complete lessons in wiki format, and a set of flash cards for a rote memorization technique of learning while learning the new language!

    A full course description can be downloaded in PDF format here.

    In time, and if successful, I plan on adding many more courses to the academy.

    Thank you all for your support!
    ~Douglas

    WEAKERTHAN LINUX 7 "Elite" Alpha Now Available!

    $
    0
    0


    This ISO release is in ALPHA phase of testing. This release is built from Debian Stretch (bleeding edge) which may cause some issues. I am currently working on the installer script so you cannot install this release from the menu yet. This is Linux version 4.3 i686 pae with FluxBox and top-heavy with information security, programming and reverse engineering tools. Well, it will be once completed.

    I redid the UI completely and even made a new FluxBox theme. Hey! Check out the "Thank you" app I always put in the menu, it has the song "Resist" from my "Heterodyne" EP! :)

    Please download it and run it in VMWare Player. If you find any errors (not missing tools, I am currently working on those and all of your requests), please let me know in the comments below or via email! weaknetlabs[at]gmail[dot]com Try the Google Drive ISO link first. It should have less issues and save some of my bandwidth!

    ISO - Google Drive Mirror: http://tinyurl.com/wt7-elite
    MD5 - Google Drive Mirror: http://tinyurl.com/wt7-elite-md5

    ISO - Local Host: http://download.weaknetlabs.com/linux/iso/wt7-elite.iso
    MD5 - Local Host: http://download.weaknetlabs.com/linux/iso/wt7-elite.md5

    Thank you!
    ~Douglas

    WARCARRIER Updates

    $
    0
    0
    I have made some updates to the WARCARRIER application and an official page for it here at home - WARCARRIER at WeakNet Labs. So take some time and read about why it was made and what it does if you into #infosec and #wifi. I also made a new HQ video demonstration on the new page but you will need a browser capable of HTML5 to play it or download it.



    This seems to be a project that I just can't keep my hands off of of the past few years. This particular application uses the Airodump-NG 802.11 protocol analyzer's CSV output, GPSD's gpspipe, and Dragorn's spectools_raw for the Ubertooth One to create a paneled dashboard for Wardriving. I have written my own 802.11 protocol analyzer script in Perl and I wrote a tutorial on how to do it in C Programming, but Airodump-NG seems to be the accessible 802.11 wheel that doesn't need to be re-invented. Though, the Libpcap library for C is a beautiful tool for dissecting packets, so someday soon I'm sure I'll revisit the idea.

    ~Douglas

    WEAKERTHAN LINUX 7 "Elite" BETA

    $
    0
    0
    Screenshot: Some new UI tweaks.

    Thank you

    Thank you to all who have tested the ALPHA release, the ALPHA ISO will be removed from the download directory and replaced with the shiny-new BETA ISO! Also thank everyone for their patience while I work through this. If only WeakNet Labs made money, I'd be able to hire people to help me and we would get more work done! Please keep in mind that this is a BETA release and is still under heavy development. This release was stalled for a number of reasons:
    • Assembly Programming with NASM (x86) book is still being revised and edited.
    • The new GitHUB repo has a full tutorial on how to create your OWN version of WT7!
    • New UI elements. I created a lot of new UI elements, including:
      • A custom, updateable-via-daemon Weather info app into Conky!
      • The FBRun app now allows you to specify if you want the app ran in the terminal!
      • Updated the VMWare Tools for the new ISO.
      • New ISOLINUX boot image and VesaMenu com32 file!
      • Updated the Dark WT7 Fluxbox theme.
      • Updated the OS and apps
      • Compiled my own version of VLC for all media playing in WT7
    • Oh, and I lost my work. So, I had to learn all about how to make a new file system from a SquashFS, then how to create a new ISO from scratch, which all works well but ultimately resulted in the new GitHUB repo for Debian customization scripts.
    • WARCARRIER's new home was updated and the GitHUB repo was also updated with my code updates. It's running smoothly in the WT7 BETA ISO.
    • Car trouble, camping, DOOM and Mirror's Edge, and other various reasons for delays happened as well.
    Again, thank you all for using Weakerthan Linux 7 ALPHA and testing it for me! I hope the BETA exceeds your expectations!


    Screenshot: Look at that new ISOLINUX splash and config! Whoo!

    I am still in the process of updating tools and thank you for all the comments. I do suggest learning more about David Kennedy's Penetration Tester's Framework, which I do have installed in /pwnt/toolbox/ptf. It is also accessible from the FluxBox menu under Penetration Testing->Add More Tools.


    Screenshot: WARCARRIER running a Bluetooth spectrum analyzer in WT7.


    Screenshot: Full screen image in VMWare

    I made the weather icons, dock image and icons, wallpapers, music, Fluxbox theme, WARCARRIER and other random InfoSec related applications, Weather app, and even the scripts to process the ISO and to even install the ISO myself. If you like the work, please consider a donation or drop me a line on LinkedIn!

    Download

    WT7 BETA ISO File: 1.6GB ISO File.
    WT7 BETA MD5 File: MD5 file for checksum of downloaded ISO.


    ~Douglas
    Viewing all 38 articles
    Browse latest View live