Wednesday, 7 June 2017

Recover Data from a Crashed Hard Disk

Recover Data from a Crashed Hard Disk

Some Method for Data Recovery

Step 1: Connect the Hard Drive to Another Computer

How to do Hard drive recovery -USB to IDE-SATA hard drive connector
USB to IDE-SATA hard drive connector
The crashed drive you will need to remove it from the current machine (unless it is an external drive that has crashed) and connect it to another machine as a secondary drive.  The best way to do this is to buy and use a USB to IDE/SATA adapter. This is the cheapest multi-functional USB 3 option and I prefer USB 3 because it is a lot faster.
If you don’t have one available then you may be able to connect the drive to another desktop computer internally as a secondary drive, though this means pulling apart another computer to install the crashed drive.  If you do, make sure that the machine detects the drive in the BIOS or you won’t be able to access it once the computer starts up.

Step 2: Try to Copy the Data to Another Drive

After you connect the drive to another computer either internally or with the USB adapter, check to see if you can browse the contents of the drive.  It is worth trying because maybe it wasn’t the drive itself that actually crashed. If you can, try to copy data off that you would like to recover.  This might not work if you are trying to recover data from a dead hard drive but there is a chance that only the operating system is corrupt and the user data is still fine.

Step 3: Download and Try Data Recovery Software

If you can’t manually copy the user data off then you can try to recover it using data recovery software.  Whatever you do, do not write anything to the drive that you are trying to recover data from. This means you should not install the recovery software onto the drive that you are trying to recover data from. Doing so could actually overwrite files that are still hidden there and that you can still restore.

PC Hard Drive Recovery:

Option 1: Recuva

Hard Drive Recovery - Recuva software Screenshot
Recuva software for hard disk recovery
Click here to get Recuva which is a free hard drive recovery tool from Piriform (the makers of CCleaner) and is one of the best free PC data recovery tools available.  Even if the drive has been formatted, Recuva can scan the drive recover files. If the basic scan fails, there is also a deep scan to discover more deeply-buried results.  There is also a portable version if you don’t want to install the full version.
When you launch Recuva, you will be presented with a wizard that will guide you through restoring your files.  First you will choose the type of file you need to recover, then the location, and then start the scan or choose “Enable Deep Scan” if the quick scan doesn’t find the files you need to recover.

Option 2: PC Inspector File Recovery

Hard Drive recovery - PC Inspector File Recovery software Screenshot
PC Inspector for Hard Disk Recovery
Click here to get PC Inspector File Recovery which is the recovery software that I originally featured in this article back in 2006.  It’s still a decent recovery tool and can be used if you are unable to recover the files you need with Recuva.
When you launch PC Inspector File Recovery, you will need to choose your language. After this, you will be presented with a welcome screen giving you three options.
The first option is “Recover Deleted Files”. This allows you to restore files that have been permanently deleted from the drive. This will only work if the deleted file has not already been overwritten.
The second option is “Find Lost Data”. This allows you to recover data that has been lost due to a system crash. If you choose this option, you will be asked for the “start cluster” and “end cluster”. Leave the default settings to scan the whole drive. The scan could take a couple of hours depending on how large your drive is.
The third option is “Find Lost Drive”. Use this option if your drive letter is not showing up in Windows Explorer or My Computer. It will attempt to connect to the drive and if successful, allow you to browse the data.

Option 3: Hiren’s BootCD

Hard Drive Recovery - Hiren's BootCD ScreenshotClick here to get Hiren’s BootCD which allows you to boot into a slimmed down version of Windows called MiniXP from the bootable CD or bootable flash drive and run diagnostic utilities on a problematic computer. Recuva is one of the utilities that comes bundled with Hiren’s so you can run it right from the CD. This is helpful if you don’t have a USB to IDE/SATA adapter or just don’t want to pull the drive from the machine.
You will need to connect another drive to the machine such as a USB flash drive or an external hard drive so you will have a place to copy your recovered data to.

Option 4: GetDataBack

Hard Drive Recovery - Get Data Back Screenshot
Get Data Back for hard drive data recovery
If the free utilities are not doing the trick then Click here to get GetDataBack give a try.  GetDataBack is sold in two different versions, one for NTFS and the other for FAT files systems.  If you want to make sure it’s going to work first before you pay $79 for the NTFS version or $69 for the FAT version, they do have a demo version that will allow you to see what files it can recover.  This gives you a zero cost option to check if your hard drive data recovery will be possible. If you like what you see, you can purchase the full version right then and there without even having to close out of the program.  I personally have had lots of success with GetDataBack when other recovery methods have failed.
After launching GetDataBack you will be asked to pick from a selection of data loss scenarios that the drive experienced.  If you aren’t sure, just select “I don’t know.”  After this you will select the drive, the partition on that drive, and then start the scan.

Mac Hard Drive Recovery Software:

MiniTool Mac Data Recovery

Mac Hard Drive Data Recovery - MiniTool Mac Data Recovery Screenshot
Mac Data Recovery for hard drive data recovery
Click here to get MiniTool Mac Data Recovery which is a data recovery tool specifically designed for Mac OS X.  It’s one of the few free Mac data recovery programs which is why I have featured it here, however, it still has a 1GB recovery limit.  After that you must pay for the full version.
When you launch MiniTool you will be presented with 4 options based on the type of recovery you would like to perform.  Undelete Recovery, Damaged Partition Recovery, Lost Partition Recovery, and Digital Media Recovery.  Once you choose your recovery type, you will then be asked to select the drive that you want to recover from.

Disk Drill

how to recover data from hard disk - Disk Drill Screenshot
Disk Drill for hard disk data recovery
Click here to get Disk Drill which is one of the newest recovery apps for the Mac OS X platform and has quickly been deemed one of the best.  You can download the Basic Edition for free which will allow you to see a list of the files that you can recover.  If the files you want to recover are detected, you can then purchase the Pro Edition and move forward with the recovery.
When you launch Disk Drill, you will be presented with the option to either Protect or Recover.  You will want to choose Recovery to begin your recovery process.  You will then choose your drive and then select either Quick Scan (for deleted files) or Deep Scan (for lost data).  Once it is finished you can select the files you wish to recover.
There are more options and utilities listed in my article Top 10 Mac Repair Tools.

Restore Deleted Files After Emptying the Recycle Bin

If, rather than entire hard drive recovery, you just need a simple method for restoring files that have been deleted from the recycle bin, check out this article. How to Restore Deleted Files After Emptying the Recycle Bin. This will only work if the file has not already been overwritten.

Step 4: (If required) Use a Data Recovery Service

Recover data from hard drive -Gillware data recovery service LogoAnd finally, if none of these methods work or if you were unable to follow the steps, then you will probably need to send the drive off to a data recovery service. A word of warning these companies are typically high tech and therefore have a corresponding price. These are real professional Data Recovery services.
Click to open Gillware.com. Gillware is one of the top recommended data recovery services in the industry.  Some of the benefits they offer are immediate online price estimates, no up front payments, and the ability to see a list of all the recovered files through their website to ensure the files you need are listed before paying a dime.

Step 5: (Optional) Put Your Hard Drive in the Freezer to Recovery Data

If all other methods fail, there is one other non-traditional method that may allow you to recover files on your own.  To learn more, check out my previously posted article titled Put Your Hard Drive In The Freezer To Recover Data.  This does not apply to solid state drives. This may be a pre-emptive action with a clicking hard drive that has not yet crashed (that is a serious warning sign). The idea is that an overheated and slightly warped disk and other components may shrink enough to briefly function. Use extreme caution, and if the data is at all important, your best bet may be to spend the money and go with a professional data recovery service. I and several people I know have had success doing this, so yes it is strange but it can sometimes work!

Root Xiaomi Redmi Note 4 with pc and without pc

Root Xiaomi Redmi Note 4 
iRoot provides 2 options for you to root your Xiaomi Redmi Note 4  on Android  If you need to perform on your Windows computer, choose the PC version for downloading. And make good preparations before rooting. Otherwise, if you want to root directly on your Xiaomi Redmi and get no computer for help, then download the iRoot apk file for Android.  

Option 1: Get iRoot for PC version to root Xiaomi Redmi Note 4 with PC
iRoot for PC version allows high root success rate. Before dive into rooting your Xiaomi Redmi Note 3 with Windows computer, make preparations as these following tips:
1. Prepare a workable Windows computer and a USB cable.
2. Charge your Xiaomi Redmi Note 4 into at least 85% battery life.
3. Install the Xiaomi driver on your Windows computer so that it can recognize your phone;
4. Enable the USB debugging mode from Developer option on Xiaomi Redmi Note 4;
5. Make a backup of your Xiaomi Redmi Note 4;

Download iRoot for PC version to root your phone.
Step 1: Open iRoot on your Windows computer. Connect your phone to the PC.

Step 2: iRoot will detect your device soon. Then, click “Root” on the interface of iRoot.
Step 3: It will take several seconds to root completely.

Step 4: Done! Just wait for its reboot.

Option 2: Get iRoot for Android to root Xiaomi Redmi Note 4 without PC
In case you don’t want to apply for a Windows computer to root your Xiaomi Redmi Note 4, choose iRoot for Android version for help. Just remember to check “Unknown sources” on your phone. This ensures the complete installation of iRoot on your device.
Step 1: Download the root Xiaomi Redmi Note 4 apk file on your phone.

Step 2: Simply tab on iRoot logo on your phone’s interface. And click “Get Root access” on iRoot interface.

Step 3: Wait for some seconds to get successful rooting.

Either way you choose, you can get your Xiaomi Redmi Note 4 rooted in just one click. Moreover, it can support to root any other models of Xiaomi. Just have a free try of iRoot.

Wednesday, 24 May 2017

Best Web Server Hacking Techniques

Web Server Hacking Techniques

Lots of people know use, configure and manage their webservers but only few of them really know how to protect their web server from getting hacked i.e making it hack proof. Today lots of websites are hosted on a dedicated web servers so it's extremely important to make your web server hack proof in order to prevent any theft and data loss, Before I mention techniques used by hackers to compromise a web server and how you can protect your web server you should know what a web server is and how it works.
What is a webserver?

Basically a webserver is a single computer or more used to host websites, For a website to be available to every one (connected to internet) 24/7 it needs to be hosted on a webserver 

How webservers work?

Webservers work in a simple manner, When ever you are using browser to surf any page your browser will request that particular page from the webserver and the server sends back the requested page.

 

The above picture illustrates how a webserver works.

How Are Webservers Compromised Or hacked? 

There are multiple reasons why a webserver gets compromised or hacked, one of the major reason is installing the webserver with default and lack of updates and weak passwords. Once the server is compromised the hacker can use it to do malicious things online. For Example Hacked webservers can be used to as zombies to for performing a more powerful DDOS attack



Webserver Hacking Techniques

Below mentioned are some of the techniques which can be used by malicious hackers to compromise a webserver.

Orthodox Password Cracking Techniques

1. A hacker can use variety of password Cracking Techniques such as Brute forceDictionary attacks and rainbow tables to crack weak administrator account passwords, However these attacks create huge logs of presence, so therefore smarter hackers either use a proxy or any other iP hiding method or they use already compromised systems to perform the attack.

2. Man In The Middle Attack

A hacker can also perform a man in the middle attack also known as ARP poisoning to steal credentials of administrator account.

3.  Keyloggers And Trojans

If A hacker can manage to install a trojan or a keylogger on administrator's computer then, the malicious hacker can easily capture the credentials

4. DNS Cache Poisoning Attack

If a hacker can manage to insert fake address records for a domain name into DNS server and can make the webserver accept the fake address record then the hacker or intruder can easily control your browser, This attack is extremely dangerous as it happens without the users knowledge, The topic is quite big and is not possible to explain it here, depending upon readers response I might make a seprate tutorial on this attack

There are many other techniques used by hackers such as Ftp server intrusion, social engineering, exploiting web application bugs which are probably to be explained in the upcoming posts at rha.

Hope you have enjoyed reading the post and have probably got some idea how hackers can attack your web server, In the next post I will continue the series and will introduce some methods you can use to protect your webserver from getting compromised.

SQL Injection Attack

SQL Injection is an attack that poisons dynamic SQL statements to comment out certain parts of the statement or appending a condition that will always be true. It takes advantage of the design flaws in poorly designed web applications to exploit SQL statements to execute malicious SQL code.
In this tutorial, you will learn SQL Injection techniques and how you can protect web applications from such attacks.

How SQL Injection Works

The types of attacks that can be performed using SQL injection vary depending on the type of database engine. The attack works on dynamic SQL statements. A dynamic statement is a statement that is generated at run time using parameters password from a web form or URI query string.
Let’s consider a simple web application with a login form. The code for the HTML form is shown below.
<form action=‘index.php’ method="post">

<input type="email" name="email" required="required"/>

<input type="password" name="password"/>

<input type="checkbox" name="remember_me" value="Remember me"/>

<input type="submit" value="Submit"/>

</form>

HERE,
  • The above form accepts the email address, and password then submits them to a PHP file named index.php.
  • It has an option of storing the login session in a cookie. We have deduced this from the remember_me checkbox. It uses the post method to submit data. This means the values are not displayed in the URL.
Let’s suppose the statement at the backend for checking user ID is as follows
SELECT * FROM users WHERE email = $_POST['email'] AND password = md5($_POST['password']);
HERE,
  • The above statement uses the values of the $_POST[] array directly without sanitizing them.
  • The password is encrypted using MD5 algorithm.
We will illustrate SQL injection attack using sqlfiddle. Open the URL http://sqlfiddle.com/ in your web browser. You will get the following window.
Note: you will have to write the SQL statements
Step 1) Enter this code in left pane
CREATE TABLE `users` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `email` VARCHAR(45) NULL,
  `password` VARCHAR(45) NULL,
  PRIMARY KEY (`id`));
  
  
insert into users (email,password) values ('m@m.com',md5('abc'));
Step 2) Enter this code in right pane
select * from users;
Step 3) Click Build Schema
Step 4)Click Run SQL. You will see the following result

Suppose user supplies admin@admin.sys and 1234 as the password. The statement to be executed against the database would be
SELECT * FROM users WHERE email = 'admin@admin.sys' AND password = md5('1234');
The above code can be exploited by commenting out the password part and appending a condition that will always be true. Let’s suppose an attacker provides the following input in the email address field.
xxx@xxx.xxx' OR 1 = 1 LIMIT 1 -- ' ]
xxx for the password.
The generated dynamic statement will be as follows.
SELECT * FROM users WHERE email = 'xxx@xxx.xxx' OR 1 = 1 LIMIT 1 -- ' ] AND password = md5('1234');
HERE,
  • xxx@xxx.xxx ends with a single quote which completes the string quote
  • OR 1 = 1 LIMIT 1 is a condition that will always be true and limits the returned results to only one record.
  • -- ' AND … is a SQL comment that eliminates the password part.
Copy the above SQL statement and paste it in SQL FiddleRun SQL Text box as shown below

Hacking Activity: SQL Inject a Web Application

We have a simple web application at http://www.techpanda.org/ that is vulnerable to SQL Injection attacks for demonstration purposes only. The HTML form code above is taken from the login page. The application provides basic security such as sanitizing the email field. This means our above code cannot be used to bypass the login.
To get round that, we can instead exploit the password field. The diagram below shows the steps that you must follow
Let’s suppose an attacker provides the following input
  • Step 1: Enter xxx@xxx.xxx as the email address
  • Step 2: Enter xxx') OR 1 = 1 -- ]
  • Click on Submit button
  • You will be directed to the dashboard
The generated SQL statement will be as follows
SELECT * FROM users WHERE email = 'xxx@xxx.xxx' AND password = md5('xxx') OR 1 = 1 -- ]');
The diagram below illustrates the statement has been generated.
HERE,
  • The statement intelligently assumes md5 encryption is used
  • Completes the single quote and closing bracket
  • Appends a condition to the statement that will always be true
In general, a successful SQL Injection attack attempts a number of different techniques such as the ones demonstrated above to carry out a successful attack.

Other SQL Injection attack types

SQL Injections can do more harm than just by passing the login algorithms. Some of the attacks include
  • Deleting data
  • Updating data
  • Inserting data
  • Executing commands on the server that can download and install malicious programs such as Trojans
  • Exporting valuable data such as credit card details, email, and passwords to the attacker’s remote server
  • Getting user login details etc
The above list is not exhaustive; it just gives you an idea of what SQL Injection

Automation Tools for SQL Injection

In the above example, we used manual attack techniques based on our vast knowledge of SQL. There are automated tools that can help you perform the attacks more efficiently and within the shortest possible time. These tools include

How to Prevent against SQL Injection Attacks

An organization can adopt the following policy to protect itself against SQL Injection attacks.
  • User input should never be trusted - It must always be sanitized before it is used in dynamic SQL statements.
  • Stored procedures – these can encapsulate the SQL statements and treat all input as parameters.
  • Prepared statements –prepared statements to work by creating the SQL statement first then treating all submitted user data as parameters. This has no effect on the syntax of the SQL statement.
  • Regular expressions –these can be used to detect potential harmful code and remove it before executing the SQL statements.
  • Database connection user access rights –only necessary access rights should be given to accounts used to connect to the database. This can help reduce what the SQL statements can perform on the server.
  • Error messages –these should not reveal sensitive information and where exactly an error occurred. Simple custom error messages such as “Sorry, we are experiencing technical errors. The technical team has been contacted. Please try again later” can be used instead of display the SQL statements that caused the error.

Hacking Activity: Use Havij for SQL Injection

In this practical scenario, we are going to use Havij Advanced SQL Injection program to scan a website for vulnerabilities.
Note: your anti-virus program may flag it due to its nature. You should add it to the exclusions list or pause your anti-virus software.
The image below shows the main window for Havij
The above tool can be used to assess the vulnerability of a web site/application.

Summary

  • SQL Injection is an attack type that exploits bad SQL statements
  • SQL injection can be used to bypass login algorithms, retrieve, insert, and update and delete data.
  • SQL injection tools include SQLMap, SQLPing, and SQLSmack, etc.
  • A good security policy when writing SQL statement can help reduce SQL injection attacks.

VR Functionality