Skip to main content

Posts

Showing posts from 2011

TCP Session Hijacking

Although TCP appears to be safe protocol because of all the negotiation involved in session establishment and all the protocol and the precision involved in data exchanged, don't get complacent.its not much secure than it should be. Network Sniffers can be setup  on the unsuspected machine to sniff the data on the network and they can snoop clear text data such userIds and passwords that are not encrypted in any way. I have one of my friend who did all this ,, he sniffed a dozen passwords and played with their network data. He was very much expert in doing sniffing and using them, othes friend don't even know their passwords are just floating in raw txt on the network. Session hijacking software, such as Hunt, uses another approach to exploit an existing TCP session. These attempt to intercept an established TCP session and hijack one end of the connection from the session to an evil host.  The problem is that conventional TCP exchanges do not require an...

ACK Scan..

An ACK scan operates by sending a TCP ACK frame to a remote port. If there are no responses or an ICMP destination unreachable message is returned, then the port is considered to be "filtered" Scans of ports are done for a variety of reasons, but they usually are used to discover whether a host or hosts are offering a particular service. If a host is found to be offering a service that might be exploitable, the hacker might try to break in using some vulnerability.Often, scans are blatant; the hacker makes no attempt to hide his reconnaissance of your network, except that the computer from which the scans originate might be compromised. The hacker assumes that either no one is monitoring the scanning activity or that by using the compromised host, no one can identify the hacker with the scan. Most likely there will be no attribution because no one can associate the hacker with the scan. This can be done by issuing folowing command #nmap -sA <host_address> Followin...

Denial of Service Attacks

A " Denial of Service" (DoS) attack is one where the attacker tries to make some resource too busy to answer legitimate requests, or to deny legitimate users access to your machine. Denial of service attacks have increased greatly in recent years. Some of the more popular and recent ones are listed below. Note that new ones show up all the time, so this is just a few examples. Read the Linux security lists and the bugtraq list and archives for more current information. SYN Flooding  - SYN flooding is a network denial of service attack. It takes advantage of a "loophole" in the way TCP connections are created. The newer Linux kernels (2.0.30 and up) have several configurable options to prevent SYN flood attacks from denying people access to your machine or services. Pentium "F00F" Bug  - It was recently discovered that a series of assembly codes sent to a genuine Intel Pentium processor would reboot the machine. This affects every machine with a Pe...

BIOS Security

The BIOS is the lowest level of software that configures or manipulates your x86-based hardware. LILO and other Linux boot methods access the BIOS to determine how to boot up your Linux machine. Other hardware that Linux runs on has similar software (Open Firmware on Macs and new Suns, Sun boot PROM, etc...). You can use your BIOS to prevent attackers from rebooting your machine and manipulating your Linux system. Many PC BIOSs let you set a boot password. This doesn't provide all that much security (the BIOS can be reset, or removed if someone can get into the case), but might be a good deterrent (i.e. it will take time and leave traces of tampering). Similarly, on S/Linux (Linux for SPARC(tm) processor machines), your EEPROM can be set to require a boot-up password. This might slow attackers down. Another risk of trusting BIOS passwords to secure your system is the default password problem. Most BIOS makers don't expect people to open up their computer and disconnect batt...

Penetration Testing Basics

Penetration testing, often called “pentesting”,“pen testing”, or “security testing”, is the practice of attacking your own or your clients’ IT systems in the same way a hacker would to identify security holes. Of course, you do this without actually harming the network. The person carrying out a penetration test is called a penetration tester or pentester. The difference between Penetration Testing and Hacking is that you have the system owner's permission to do testing and to identfiy security holes. If you want to do penetration testing u should better ask for his/her permission. Basic Security Concepts Vulnerability: It is a security hole in a piece of software, hardware of Operating system that provides a way to attack the system.A vulnerabilty is as simple as weak passwords and as complex as buffer overflows as well as SQL injection. Security Research: Vulnerabilities are typically searched by security researchers who finds the flaws in the system. Security Research can ...

Dynamic Host Configuration Protocol ( DHCP )

DHCP is a protocol that permits dynamic assignment of IP numbers. This replaces the labor-intensive process of IP address management, in which every host is configured with a static IP number assigned to it. DHCP allows the centralization and automation of the IP assignment process. Hosts are leased an IP number for a given amount of time, and this makes the process of managing and administering large networks more efficient. This is good for the network administrator, but makes the security administrator's job more complicated (for example, when some IP number and associated temporary owner have to be chased down for questionable activity). Computers that are connected to non-DHCP equipped IP networks must be configured before they can communicate with other computers on the network. DHCP allows a computer to be configured automatically, eliminating the need for intervention by a network administrator. It also provides a central database for keeping...

Cropping , Scaling and Rotating image in Android

Here i am not writing any program to crop, scale and rotate image , im just writing the basic process with some code to show it... Cropping of BitmapImage is done in an easier way as follows Get the bitmap image - if its in resources Bitmap origBitmap=BitmapFactory.decodeResource(getResource(),R.drawable.bitmapImage); now u have got the Bitmap image from the drawable resource, my drawable resource name is bitmapImage.png , u can choose your own and correct accordingly. Co-ordinates start from the top left corner of the Image as in Java. So if u want to crop from (0,0) having width 50 and height 50 of an image having width and height of 400*400. u jsut have to create a new Bitmap by giving appropriate coordinates,, Bitmap croppedBitmap=Bitamp.create(origBitmap,0,0,50,50); here u have to consider the width and height of the cropped bitmap that it should not exceed the original height and width of the image. now Your Cropped Bitmap Image is ready , you can use it in imageView as imageVi...

RESTFul Client on Android

I was surfing on net , i didn't get a needed help on RESTful Client on Android, so I decided to write my own. Following is the code.. First of all REST service architecture uses all the basic operations of HTTP to interact. First of all u would have to set make a HttpGet method with the URI to be requested. HttpGet httpGet=new HttpGet(new URI("www://abc.con"); i have used new URI() as a get parameter because if u are sending some parameters with the GET request , it will encode the parameters ready to be sent along the network channel. Second step is that u will have to make a HttpClient which will execute the GET request that we have made. It is made as follows-- HttpClient httpClient=new DefaultHttpClient(); now execute the GET request from the HttpClient as Make a variable to hold Response of the request HttpResponse httpResponse=httpClient.execute(httpGET); to convert the Response to string use the following line String result=EntityUtils.toString(httpResponse.get...

NMAP Basics

Nmap is a free open source software available for both Linux and Windows. Basically its a port scanning software. Basic Scan Types The two basic scan types used in nmap are TCP connect() scanning [-sT] and SYN scanning (also known as half-open,or stealth) [-sS]. TCP Connect() scanning [-sT] These scans are named as connect() scanning because UNIX has a system call named connect() to start any TCP connection to a remote machine.If the connection succeeds to a particular port of remote machine i.e it connects , then that port is listed OPEN for that remote machine, if connection fails , then remote machine showed either offline or port is closed. It runs simple process of scannig all the ports of the remote machine and lists which posts are open and which are closed. This is an easy way and gives a clear picture of the process but it has disadvantage too ,if the reomte machine is having advanced firewalls and intrusion detection systems, it will flag a warning that all ports are scann...