Sunday, August 30, 2015
scapy for hacking
Scapy is a Python based program. It's using for packet building. Actually you can build the complete IP packet using scapy. It's very useful achieve following hacking techniques.
1. IP spooifng.
2. ARP spoofing.
3. SYN flood.
4. Traceroute.
And more more other things can be done using this tool.
First we will start from Traceroute.
Traceroute.
Traceroute is a tool used in Windows to trace the route to a particular destination address. That's means the intermediate hops situated between the destination and source. In Windows cmd simply type tracert <destination> . Then it will gives you a clear image of what are the intermediate hops. But pathping in cmd gives us comprehensive view of what are the hosts between destination and the source and also the packet loss also between each intermediate host.
This tool can be written using scapy module in python. Actually how the traceroute happens. Every IP packet has a field called ttl(time to live). This field define how many hops the packet can go. If ttl equals to 5, that's mean it can only go through 5 hops.When it received to the nearest host it will reduce the ttl value by one. So let's say we put the ttl value of a packet to 2 and we send it as a ICMP packet...Then the replies came are from the 2nd hop from the source. If we look at the received packet's source address we can determine who are the 2nd hop from the source. So following is the code to achieve these things in Python.
#! /usr/bin/python
from scapy.all import IP,UDP,ICMP
packet = IP(dst = destination add. ttl = 5) / ICMP()
reply = sr(packet)
print reply.src
This code will print the 5 hosts between the source and the destination.
IP Spoofing.
Sunday, August 16, 2015
How to make your own Decompression bomb
What is a decompression bomb.
Decompression bomb is a file which is compressed that apparently looks very small file but when it decompressed it becomes a huge file which will eat your disk space and memory to copy. It may be freeze your machine or corrupt files and may be damage to OS.What is the technique behind this.
The technique is compression. ZIP TAR RAR ...etc. These compression tools get the files' bits and match the patterns. For these patterns they adds certain bits to identify at the decompression. Advantage of this use to make a decompression bomb.Let's make it.
I will introduce here you 2 ways to make a Decompression bomb your self.Using Linux
Get terminal and type as follow
dd if=/dev/zero bs=1024 count=1000000 | zip bomb.zip -
/dev/zero is a device file which is null. This will create a 1gig null file and zip it as bomb.zip. bs is for Block Size and as count you can specify the size of the bomb. Remember to put the Dash at the end.
In this method I've tested it created 1Gb file into 1Mb zip.
Using Notepad in windows.
Using notepad also we can create a Decompression bomb. We can write a null file using Alt+255.
Open notepad, turn on num and hold Alt , type 255 with Alt. Then you can see null (zero) block written. Type this for several times , select all , copy it and paste it. Paste several times and select all again and then you can copy a big block. Like that you can create a huge txt file with zeros.
After you've create the txt you can see the size of your file. This may be 500mb or may be few Gbs. Copy the txt and make several copies of this txt in the same folder. Open the cmd in the same directory and type copy /b *.txt bomb.txt
This will be create a one file called bomb.txt including all copies that you created. Make a zip file by this bomb.txt.
In this method i tested it created a 4Gb txt into 8Mb zip
Thursday, August 13, 2015
How to Reset Linux Root password without login
Access Single User Mode (Reset Root Password)
To reset the root password of your server, you will need to boot into single user mode.
Access the Manage section of your server in the customer portal and follow these steps. The option depends on the bootloader version on the machine:
CentOS 6
- Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
- You will see a GRUB boot prompt telling you to press any key - you have only a few seconds to press a key to stop the automated booting process. (If you miss this prompt you will need to restart the VM again)
- At the GRUB prompt, type "a" to append to the boot command.
- Add the text "single" and press enter.
- System will boot and you will see the root prompt. Type "passwd" to change the root-password and then reboot again.
Debian, Ubuntu, CentOS 7
- Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
- As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
- You will see a GRUB boot prompt - press "e" to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)
- Find the kernel line (starts with "linux /boot/") and add init="/bin/bash" at the end of the line
- Press CTRL-X or F10 to boot.
- System will boot and you will see the root prompt. Type "mount -rw -o remount /" and then "passwd" to change the root password and then reboot again.
Tuesday, July 14, 2015
How to Delete OR Format files unrecoverable way
Today probably every computer user know and used to get use of a recovery software to recover deleted files and folders. Those softwares are very useful when we delete some important files let's say you have a photograph that only in your PC and you've mistakenly deleted it. So then recovery software is like came from heaven. But on the other hand think you formatted your hard disk and you sold it out. And the photograph that you're bothered should be a very private one. And the guy who got your PC recover your hard disk from the same manner that you recovered your photograph. So he got your photographs and what do you think he will gonna do with it.
The most important thing with data is private and confidential which are deserved. So when we come to the point of data confidential, data recovery becomes very critical. So let's look how to remove a file forever and ever.
First we will look how files can be recovered. Actually any data on a disk / flash drive cannot be erase like you erase pencil marks on a book. When the data have written on the disk they last forever. Then you may ask "If files cannot be deleted what are we do by deleting files?". You may know File Allocation Table (FAT). (If you want to get some idea of file allocation table and what is file system means look What are File Systems). File Allocation Table has links to data on the disk with files names , attribs ,... So when we have deleted a file , actually its deleted from this FAT table. It's remove the link to the data on the disk from the label of the file. But on the disk the real data (ones and zeros) are exist and they will remain until we over write some data on top of it. The data recovery software is doing , scan for those data on the hard disk. Some times you may have seen when we scan hard / flash drive from a recovery software some file indicate as unrecoverable. Those are files which are over written by other data. When data is over written they cannot be recoverable. There is a phrase "Data cannot be deleted but can be over written".
Monday, July 6, 2015
Windows Hacking Tool INTERCEPTER
There are several windows based hacking tools very useful for day to day hackings. Intercepter is also one of that. There is a linux version also. Any way let's take look at this handy tool.
Below picture is the over look of the Intercepter.
Saturday, July 4, 2015
What are File Systems and How to Open Linux Partitions in Windows
What are file systems?
As simply it is the system of Writing or Retrieving our data on/from a disk or flash drive or any other storage media in systematic way. If there is no file system, a hard drive will be only a disk with ones and zeros that can not be read by a computer because there is no way to find the data position.
Let's assume a Library with thousands of books. Normally in a library it has sections. like Science, History, Fictions, Novels etc. And in a particular section also there may be categorized sub section like Bio science, Electronic Science, Computer Science in Science section. In a particular sub section there may have a Rack or Racks with Rows and columns numbered which a particular cell get a unique combination. In a particular cell there may have 5 books. The librarian has a table of every book of the library describes in which section's in which sub section's in which rack's and in which cell is the book placed.
So if we go to this library and ask from the librarian about a book of "Beginning for Electronic circuits" she/he may look at the table and go through Science section and in Electronic sub section and find the book and locating where is the cell. So librarian will say to you "son, go to science section and then in electronic sub section.Then go to 3rd rack's AZ cell. The book you are finding is there.". So you can find the cell and get the book easily.
Thursday, July 2, 2015
IP and Packet Spoofing tools
IP Spoofing Attack Tool List
If you want to see full detail of IP Spoofing, please go to the Source.
Services vulnerable to IP spoofing
Configurations and services that are vulnerable to IP spoofing:
- RPC (Remote Procedure Call services)
- Any service that uses IP address authentication
- The X Window System
- The R services suite
Most popular tools used to modify packet headers:
Tools – For Windows
Subscribe to:
Posts (Atom)
