10.09.2016 Views

Hacking_and_Penetration_Testing_with_Low_Power_Devices

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Penetration</strong> testing <strong>with</strong> a single beagle<br />

119<br />

FIGURE 5.21<br />

LAN Manager passwords cracked <strong>with</strong> John the Ripper.<br />

The appropriate comm<strong>and</strong> to crack these passwords is john –wordlist¼/pentest/<br />

password/wordlists/rockyou.txt hashdump.txt. John will output the passwords it<br />

finds. You can also list passwords later using john –show hashdump.txt. The output<br />

from running john is shown in Figure 5.21.<br />

Note that LAN Manager passwords are cracked in two separate parts <strong>and</strong> are not<br />

case-sensitive. Windows converts passwords to upper case <strong>and</strong> truncates them to<br />

fourteen characters. The LAN Manager passwords are particularly vulnerable<br />

because the first <strong>and</strong> last seven characters are hashed separately. The user Bob<br />

has a password of “JessicaAlba” <strong>and</strong> Phil has a password that starts <strong>with</strong> “moneymo”.<br />

After some intelligent guessing, Phil’s password is found to be “moneymoney”.<br />

Because the Linux computer at 192.168.10.101 has no vulnerable services, the only<br />

practical way to attack this box is to crack user passwords. This presents a challenge as<br />

we know one user account, root, <strong>with</strong> certainty. Based on the OpenVAS scan, the<br />

machine appears to run some flavor of Ubuntu so we might also try the username<br />

ubuntu. A successful password crack for the ubuntu user is shown in Figure 5.22.<br />

Once we have a foot in the door <strong>with</strong> the ubuntu log-in, we can download the /etc/<br />

passwd file in order to get additional usernames for cracking more passwords. We<br />

can also try our luck <strong>with</strong> a sudo -s comm<strong>and</strong> from the ubuntu log-in. If we are fortunate,<br />

the user will be in the sudoers list <strong>and</strong> we will be prompted for the known<br />

ubuntu password <strong>and</strong> not the root password. Once logged in as root, there is little<br />

we can’t do including downloading the /etc/shadow file. While it might seem strange<br />

to crack passwords after obtaining root access, many people reuse the same password<br />

on multiple systems.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!