Okay,,now we learn about privelege escalation. What is privelege escalation?
Privilege escalation is the act of
exploiting a bug, design flaw or configuration oversight in an
operating system or software application to gain elevated access to
resources that are normally protected from an application or user.
There
are two kinds of privilege escalation: Vertical and Horizontal.
- Vertical privilege escalation requires the attacker to grant himself higher privileges. This is typically achieved by performing kernel-level operations that allow the attacker to run unauthorized code.
- Horizontal privilege escalation requires the attacker to use the same level of privileges he already has been granted, but assume the identity of another user with similar privileges. For example, someone gaining access to another person's online banking account would constitute horizontal privilege escalation.
What is LFI? A local file inclusion (usually called “LFI”) is a webhacking technique that allow simply to include files from a local location. That means that we can include a file that is outside of the web directory (if we got rights), and execute PHP code.
LFI (Local File Inclusion)
- Open mutillidae from browser, you will see url bellow:
http://localhost/mutillidae/index.php?page=home.php
- The uri above "?page=home.php" indicate that this application try to
read some file in local server. We can try to read other file in
system, for example /etc/passwd
http://localhost/mutillidae/index.php?page=../../../../../../etc/passwd
- Wow, can you see that
Brute Force
- Run your Hydra within this command:
Usage
hydra -> the progam name
-l -> the username
-P -> the wordlists
127.0.0.1 -> your target host, it can be change using domain
http-post-form -> the service module
"/mutillidae/index.php?page=login.php:username=^USER^&password=^PASS^&login-php-submit-button=Login:Not Logged In"
/mutillidae/index.php?page=login.php -> path application
username -> input form
password -> input form
login-php-submit-button -> input form at submit button
Not Logged In -> error message when the application failed to log in.
Run this command
hydra -l admin -P pass.txt 127.0.0.1 http-post-form "/mutillidae/index.php?page=login.php:username=^USER^&password=^PASS^&login-php-submit-button=Login:Not Logged In"
- Ok, the password found
Hydra v7.1 (c)2011 by van Hauser/THC & David Maciejak - for legal purposes only Hydra (http://www.thc.org/thc-hydra) starting at 2012-09-15 12:51:15 [DATA] 8 tasks, 1 server, 8 login tries (l:1/p:8), ~1 try per task [DATA] attacking service http-post-form on port 80 [80][www-form] host: 127.0.0.1 login: admin password: adminpass [STATUS] attack finished for 127.0.0.1 (waiting for children to finish) 1 of 1 target successfuly completed, 1 valid password found Hydra (http://www.thc.org/thc-hydra) finished at 2012-09-15 12:51:16
- We need to configure network of our browser, in this case I assuming using firefox.
- Clik Edit->Preferences->Select Advanced Tab->Select Network->Setting.
Host : 127.0.0.1
Port : 8080
- Open Burp Suite, Start menu->Backtrack->Vulnerability Assesment->Web Vulnerabilty Assesment->Web Application Proxies->Burp Suite
- Goto Proxy tab->Intercept tab and make sure that "intercept" is on
- Go back into Firefox, open login page of Mutillidae
- You will see the Burp Suite blinking at the taskbar
- Go to Burp Suite window
- Click forward button
- Goto Mutillidae login page and fill username and password random (test only)
for example I'm using user:pass and then click login. You will see burp suite blinking. Go back into burp suite window.
- Click right on the raw column and select "send to intruder"
- Go to Intruder tab,
Block some text and click clear
Select "Culster Bomb" for attack type
- Still on Intruder tab, select Payload tab
Select "1" at payload type, and add a username (you can add more than one username)
Select "2" at payload set, and add lists of random password
- Go to Burp Suite menu, select Intruder->Start Attack, and wait for brute force.
If username and password cracked, you will see the result look like this...
http://localhost/mutillidae/index.php?page=login.php
0 comments:
Post a Comment
Comment in here...