Search This Blog

Wednesday, 31 August 2011

How To Recover Deleted Files


Have you accidentally deleted your files from the Hard disk? Do you desperately want to recover them back? Well, you need not panic!
It is possible to recover the deleted files back from the hard disk  (even after you have Shift+Deleted)  provided you act as soon as you realize that the files are deleted and use the best deleted files recovery software.
In this post you will find a detailed information on how to recover the deleted files from your Windows PC or Mac.
 

How Does the File Recovery Process Works?

 
When you delete a file from your computer, (or even from the recycle bin) the file is not actually deleted. Unlike what most people think, the file is not permanantly deleted or dropped from your hard disk even if you have deleted them from the recycle bin.
Let’s take up a small example of a book containing 50 pages. Suppose when you delete the page 25, assume that only the entry in the index which points to the page 25 is deleted and not actually the page 25 itself. Likewise, when you delete a file from your hard disk, only the pointer which points to this file is removed and not actually the file itself. This file still exists intact and is 100% possible to recover it back in the original condition. In this condition, the file becomes invisible and hence appears to have been deleted.
Recovering the deleted files 100% back in the original condition is very much dependent on the efficiency of the Data Recovery software you use. So, it is necessary to make a right choice when it comes to the selection of file recovery software.  
Today, there exists hundreds of data recovery tools and softwares on the market which boast to recover 100% of all the deleted files back in the original condition. But in reality, most of these softwares are neither effective nor capable of recovering your files back. So, when it comes to Data Recovery, I recommend the following software as the best:
 
 
Stellar Phoenix is one of the best company specializing in deleted files recovery services and solutions since 1993. Stellar’s Data Recovery Solutions encompasses a wide range of software for almost any data loss situation ranging from accidental formats to virus attacks to software malfunctions. Hence Stellar provides the best tools to recover deleted files with over 1,000,000 satisfied customers across 137 countries.
 

What are the Chances of Recovering my Files Back?

 
Since the operating system doesn’t immediately re-use the space from the deleted files, it is most certainly possible to recover the deleted files back in 100% original condition. It may take up a very long time for those files to be completely deleted since the modern hard disks have ample capacity. Hence the chances are too less that the space from the deleted files are re-used immediately.
So, it is really worth to try out the file recovery softwares like Stellar Data Recovery for Windows or Stellar Data Recover for Mac. Some files are reported to have been recovered even after years of it’s deletion. However, for the best results, it is recommended that you use the file recovery software as immediately as possible to recover your deleted files.
 

Recovering the Deleted Files

 
In order to recover the deleted files all you need to do is perform a scan (search) for the deleted files using a File Recovery Software. Please be informed that there is no manual way to recover the deleted files. The Phoenix Data Recovery software performs a thorough scanning of the hard disk sector by sector and will locate the existence of deleted files to restore them back in the original condition. It is the only software that supports 185 popular file types including Windows NT Registry, JPEG, MP4, GIF, BMP and MS Word files. The software offers rich graphical support and incorporates advanced scanning methods to completely scan and recover deleted files from your hard drive. With this recovery software, it is possible to
  • Recover FAT16, FAT32, VFAT, NTFS, and NTFS5 file system partitions
  • Recover deleted emails
  • Recover deleted documents
  • Recover deleted photos
  • Recover deleted music
  • Formatted Hard-Drive recovery
  • Recover files from USB Drives, CDs, DVDs and memory cards
  • Recover almost all the camera format files
Visit the following links for more information on Stellar Data Recovery
 

Phishing


Phishing is an attempt to criminally and fraudulently acquire sensitive information, such as usernames, passwords and credit card details, by appearing as a trustworthy entity in an electronic communication. eBay, PayPal and other online banks are common targets.
Phishing is typically carried out by email or instant messaging and often directs users to enter details at a website, although phone contact has also been used.
Phishing is an example of social engineering techniques used to fool users. Attempts to deal with the growing number of reported phishing incidents include legislation, user training, public awareness, and technical measures.
Recent phishing attempts have targeted the customers of banks and online payment services. Social networking sites such as Orkut are also a target of phishing.
Spoofed/Fraudulent e-mails are the most widely used tools to carry out the phishing attack. In most cases we get a fake e-mail that appears to have come from a Trusted Website . Here the hacker may request us to verify username & password by replaying to a given email address.
 
TECHNIQUES BEHIND PHISHING ATTACK
 
1. Link Manipulation
Most methods of phishing use some form of technical deception designed to make a link in an email appear to belong to some trusted organization or spoofed organization. Misspelled URLs or the use of subdomains are common tricks used by phishers, such as this example URL
instead of www.microsoft.com
 
2. Filter Evasion
Phishers have used images instead of text to make it harder for anti-phishing filters to detect text commonly used in phishing emails. This is the reason Gmail or Yahoo will disable the images by default for incoming mails.
 
How does a phishing attack/scam look like?
As scam artists become more sophisticated, so do their phishing e-mail messages and pop-up windows. They often include official-looking logos from real organizations and other identifying information taken directly from legitimate Web sites. Here is an example of how the phishing scam email looks like
Example of a phishing e-mail message, including a deceptive URL address linking to a scam Web site.
To make these phishing e-mail messages look even more legitimate, the scam artists may place a link in them that appears to go to the legitimate Web site (1), but it actually takes you to a phishing site (2) or possibly a pop-up window that looks exactly like the official site.
These copycat sites are also called “spoofed” Web sites. Once you’re at one of these spoofed sites, you may send personal information to the hackers.
 
How to identify a fraudulent e-mail?
Here are a few phrases to look for if you think an e-mail message is a phishing scam.
“Verify your account.”
Legitimate sites will never ask you to send passwords, login names, Social Security numbers, or any other personal information through e-mail.
“If you don’t respond within 48 hours, your account will be closed.”
These messages convey a sense of urgency so that you’ll respond immediately without thinking.
“Dear Valued Customer.”
Phishing e-mail messages are usually sent out in bulk andoften do not contain your first or last name.
“Click the link below to gain access to your account.”
HTML-formatted messages can contain links or forms that you can fill out just as you’d fill out a form on a Web site. The links that you are urged to click may contain all or part of a real company’s name and are usually “masked,” meaning that the link you see does not take you to that address but somewhere different, usually a scam Web site.
Notice in the following example that resting the mouse pointer on the link reveals the real Web address, as shown in the box with the yellow background. The string of cryptic numbers looks nothing like the company’s Web address, which is a suspicious sign.
So the Bottom line to defend from phishing attack is
1. Never assume that an email is valid based on the sender’s email address.
2. A trusted bank/organization such as paypal will never ask you for your full name and password in a PayPal email.
3. An email from trusted organization will never contain attachments or software.
4. Clicking on a link in an email is the most insecure way to get to your account.

How To Hack MySpace


MySpace being one of the world’s largest social networks, has become today a favorite place for many to maintain secret relationships and exchange cheating messages. I myself have seen many cheaters create MySpace accounts in order to have secret relationships with another person. So, it’s no wonder why many people want to hack MySpace account of their spouse, girlfriend or boyfriend so as to reveal the secret. Well, if you are here to know “how to hack MySpace”, then you have landed at the right place!

Is it possible to hack MySpace?

 
Yes! As a matter of fact, almost anything can be hacked on the Internet. However, you must be aware of the following things before you proceed to hack MySpace.    
1. Never trust any hacking service that claims to hack a MySpace password in exchange for a fee. I have personally tried and tested many of them; all I can tell you is that they are no more than a scam.  
2. With my experience of over 8 years in the field of hacking and IT security, I can tell you that there are only TWO ways to hack MySpace: They are Keylogging and Phishing. All the other ways are simply scam or don’t work!
The following are the only 2 foolproof methods that work:  

1. Keylogging: The easiest way

The easiest way to hack MySpace is by using a keylogger (also known as spy software). A keylogger is a small program that monitors each and every keystroke that a user types on a specific computer’s keyboard.
Keylogging can not only get you the password, but also has the power to monitor each and every activity that they perform on their computer. To use a keylogger you don’t need to have any special knowledge or technical experience. Anyone with a basic knowledge of computer can install and use the keyloggers with ease.
Hence, for a novice computer user, using a keylogger can be the best way to gain access to MySpace or any other online account. With my experience, I recommend the following keylogger as the best.  
Easily Access any Email
- The No.1 Keylogger (Tested)
SniperSpy is a revolutionary product that allows you to easilyaccess *ANY* online account or password protected material such as MySpace, Facebook, Yahoo, Gmail etc. There are absolutely *NO* limitations to what accounts or websites this software can access!
  • SniperSpy – for Windows
  • SniperSpy – for Mac
Gain access to MySpace with SniperSpy
Why Sniperspy is the best?  
1. With my experience of over 8 years in the field of IT security, I have tried almost every software currently available and know the ins and outs of what it is and how it actually works.   
2. Sniperspy is the only software that offers a complete stealth and easy access to any password. Hence I recommend SniperSpy as the best to hack MySpace password. 
Here is a summary of benefits that you will receive with Sniperspy: 
1. Access ANY Password  
Sniperspy records every keystroke typed on the computer thereby allowing you to access any type of password protected account such as MySpace, Facebook, Hi5 and other email accounts. 
2. Monitor all the Activities on the Target Computer and Access Protected MySpace Accounts  
With Sniperspy, you can secretly capture the screenshots, record IM conversations, monitor their web activity and do many more…  
 3. Never Get Caught 
This software runs in a total stealth mode which makes it possible to record the activities without anyone knowing it. Thus, you need not worry about being traced back!
4. Remote Install Feature 
No physical access to your remote PC is needed to install the spy software. You can install the software even if the PC is out of country and easily gain access to the target MySpace account! 
5. Extremely Easy to Use 
SniperSpy is designed for novice computer users and thus requires no special skills. 
How safe is to use SniperSpy?
SinperSpy is completely safe and secure since it neither collects any information from your computer nor contact you in any way unless you request assistance. SniperSpy is a reputed, trustworthy and reliable company which offers 100% privacy for it’s users.
What are the minimum system requirements?
Any computer running on Pentium or AMD 433mhz or Better, at least 64MB RAM with Windows 2000/XP/Vista/7 OR Mac.
Is my online order 100% secure?
Absolutely Yes! All the e-commerce transactions for SniperSpy are routed through a highly secure payment gateway. So all your information remains private and secure. So go grab SniperSpy now and expose the truth!

2. Other ways to hack Myspace account

Phishing is the most commonly used method to hack into MySpace or any other email account. This technique involves the use of Fake Login Page (also known as spoofed page). These fake login pages resemble the original login pages of sites like Yahoo, Gmail, MySpace etc. Here, the victim is tricked to make him believe the fake login page to be the real one and enter his password there. But once the user attempts to login through these pages, his/her login details are stolen away by the hacker who is behind the phishing attack. Therefore phishing can be a very effective way in gaining access to password protected online accounts such as MySpace. 
However, phishing requires specialized knowledge and high level skills to implement; which is not possible for a novice computer user. Also, phishing is considered as a serious crime and the attacker can go behind the bars if caught. So, I recommend the use of keyloggers as the best way to hack MySpace.
I hope this information has helped you. If you have any further queries, you can leave a comment below so that I can come up with a response. Please don’t contact me asking to hack a MySpace account for you, which I would definitely not. Kindly be advised that this website only offers information on ethical hacking and security and does not provide any sort of paid/personal hacking service.

Netbios Hacking


THIS NETBIOS HACKING GUIDE WILL TELL YOU ABOUT HACKING REMOTE COMPUTER AND GAINING ACCESS TO IT’S HARD-DISK OR PRINTER. NETBIOS HACK IS THE EASIEST WAY TO BREAK INTO A REMOTE COMPUTER.
STEP-BY-STEP NETBIOS HACKING PROCEDURE
1.Open command prompt
2. In the command prompt use the “net view” command
( OR YOU CAN ALSO USE “NB Scanner” OPTION IN “IP TOOLS” SOFTWARE BY ENTERING RANGE OF IP ADDRESSS. BY THIS METHOD YOU CAN SCAN NUMBER OF COMPUTERS AT A TIME).
Example: C:\>net view \\219.64.55.112
The above is an example for operation using command prompt. “net view” is one of the netbios command to view the shared resources of the remote computer. Here “219.64.55.112″ is an IP address of remote computer that is to be hacked through Netbios. You have to substitute a vlaid IP address in it’s place. If succeeded a list of HARD-DISK DRIVES & PRINTERS are shown. If not an error message is displayed. So repeat the procedure 2 with a different IP address.
3. After succeeding, use the “net use” command in the command prompt. The “net use” is another netbios command which makes it possible to hack remote drives or printers.
Example-1: 
C:\>net use D: \\219.64.55.112\F
Example-2: 
C:\>net use G: \\219.64.55.112\SharedDocs
Example-3: 
C:\>net use I: \\219.64.55.112\Myprint
 
NOTE: In Examples 1,2 & 3, D:,G: & I: are the Network Drive Names that are to be created on your computer to access remote computer’s hard-disk.
NOTE: GIVE DRIVE NAMES THAT ARE NOT USED BY ANY OTHER DRIVES INCLUDING HARD-DISK DRIVES, FLOPPY DRIVES AND ROM-DRIVES ON YOUR COMPUTER. THAT IS, IF YOU HAVE C: & D: AS HARD DIRVES, A: AS FLOPPY DIVE AND E: AS CD-DRIVE, GIVE F: AS YOUR SHARED DRIVE IN THE COMMAND PROMPT
F:,”SharedDocs” are the names of remote computer’s hard-disk’s drives that you want to hack. “Myprint” is the name of remote computer’s printer. These are displayed after giving “net use” command. “219.64.55.112″ is the IP address of remote computer that you want to hack.
4. After succeeding your computer will give a message that “The command completed successfully“. Once you get the above message you are only one step away from hacking the computer.
Now open “My Computer” you will see a new “Hard-Disk drive”(Shared) with the specified name. You can open it and access remote computer’s Hard-Drive. You can copy files, music, folders etc. from victim’s hard-drive. You can delete/modify data on victim’s hard-drive only if WRITE-ACCESS is enabled on victim’s system. You can access files/folders quickly through “Command Prompt”.
NOTE: If Remote Computer’s Firewall Is Enabled Your Computer Will Not Succeed In Gaining Access To Remote Computer Through Netbios. That is Netbios Hacking Is Not Possible In This Situation.(An Error Message Is Displayed). So Repeat The Procedure 2,3 With Different IP Address.
ENJOY YOUR NETBOS HACKING!!

How To Hack Windows Administrator Password


This hack will show you how to reset Windows administrator password (for Win 2000, XP, Vista and Win 7) at times when you forget it or when you want to gain access to a computer for which you do not know the password.
Most of us have experienced a situation where in we need to gain access to a computer which is password protected or at times we may forget the administrator password without which it becomes impossible to login to the computer. So here is an excellent hack using which you can reset the password or make the password empty (remove the password) so that you can gain administrator access to the computer. You can do this with a small tool called  Offline NT Password & Registry Editor. This utility works offline, that means you need to shut down your computer and boot off your using a floppy disk, CD or USB device (such as pen drive). The tool has the following features.
  • You do not need to know the old password to set a new one
  • Will detect and offer to unlock locked or disabled out user accounts!
  • There is also a registry editor and other registry utilities that works under linux/unix, and can be used for other things than password editing.
 

How it works?

 
Most Windows operating systems stores the login passwords and other encrypted passwords in a file called sam (Security Accounts Manager). This file can be usually found in \windows\system32\config. This file is a part of Windows registry and remains inaccessible as long as the OS is active. Hence it is necessary that you need to boot off your computer and access this sam file via boot. This tool intelligently gains access to this file and will reset/remove the password associated with administrator or any other account.
The download link for both CD and floppy drives along with the complete instructions is given below
It is recommended that you download the CD version of the tool since floppy drive is outdated and doesn’t exist in today’s computer. Once you download you’ll get a bootable image which you need to burn it onto your CD. Now boot your computer from this CD and follow the screen instructions to reset the password.
 

Another simple way to reset non-administrator account passwords

 
Here is another simple way through which you can reset the password of any non-administrator accounts. The only requirement for this is that you need to have administrator privileges. Here is a step-by-step instruction to accomplish this task.
1. Open the command prompt (Start->Run->type cmd->Enter)
2. Now type net user and hit Enter
3. Now the system will show you a list of user accounts on the computer. Say for example you need to reset the password of the account by name John, then do as follows
4. Type net user John * and hit Enter. Now the system will ask you to enter the new password for the account. That’s it. Now you’ve successfully reset the password for John without knowing his old password.
So in this way you can reset the password of any Windows account at times when you forget it so that you need not re-install your OS for any reason. I hope this helps.

How To Detect Anonymous IP Addresses


As the fraudsters are now becoming more sophisticated in bypassing the Geo-location controls by using proxies (Anonymous IPs) to spoof their IP address, it has become very much necessary to come up with a means for detecting the proxies so that the authenticity of the users can be verified. Using a proxy (web proxy) is the simplest and easiest way to conceal the IP address of an Internet user and maintain the online privacy. However proxies are more widely used by online fraudsters to engage in cyber crimes since it is the easiest way to hide their actual Geo-location such as city/country through a spoofed IP address. Following are some of the examples where fraudsters use the proxies to hide their actual IP.
 
1. Credit Card Frauds
For example, say a Nigerian fraudster tries to purchase goods online with a stolen credit card for which the billing address is associated with New York. Most credit card merchants use Geo-location to block orders from countries like Nigeria and other high risk countries. So in order to bypass this restriction the credit card fraudster uses a proxy to spoof his IP address so that it appears to have come from New York. The IP address location appears to be legitimate since it is in the same city as the billing address. A proxy check would be needed to flag this order.
 
2. Bypass Website Country Restrictions
Some website services are restricted to users form only a selected list of countries. For example, a paid survey may be restricted only to countries like United States and Canada. So a user from say China may use a proxy so as to make his IP appear to have come from U.S. so that he can earn from participating in the paid survey.
 

Proxy Detection Services

 
So in order to stop such online frauds, Proxy Detection has become a critical component. Today most companies, credit card merchants and websites that deal with e-commerce transactions make use of Proxy Detection Services like MaxMind andFraudLabs to detect the usage of proxy or spoofed IP from users participating online.
Proxy Detection web services allow instant detection of anonymous IP addresses. Even though the use of proxy address by users is not a direct indication of fraudulent behaviour, it can often indicate the intention of the user to hide his or her real IP. In fact, some of the most used ISPs like AOL and MSN are forms of proxies and are used by both good and bad consumers.
 
How Proxy Detection Works?
Proxy detection services often rely on IP addresses to determine whether or not the IP is a proxy. Merchants can obtain the IP address of the users from the HTTP header on the order that comes into their website. This IP address is sent to the proxy detecting service in real time to confirm it’s authenticity.
The proxy detection services on the other hand compare this IP against a known list of flagged IPs that belong to proxy services. If the IP is not on the list then it is authenticated and the confirmation is sent back to the merchant. Otherwise it is reported to be a suspected proxy. These proxy detection services work continuously to grab a list or range of IPs that are commonly used for proxy services. With this it is possible to tell whether or not a given IP address is a proxy or spoofed IP.
 
How to Tell Whether a given IP is Real or a Proxy?
There are a few free sites that help you determine whether or not a given IP is a proxy. You can use free services like WhatisMyIPAddress to detect proxy IPs. Just enter the suspected IP in the field and click on “Lookup IP Address” button to check the IP address. If it is a suspected proxy then you will see the results something as follows.
Detect Anonymous Proxy
So for all those who think that they can escape by using a spoofed IP, this post is the answer. I hope this information helps. Pass your comments.

Command Prompt Commands

In this tutorial i will guide you through the top 10 important and frequently used commands in command prompt with their usage. 

1. ipconfig :
                  This is the most frequently used command for checking the ip address,subnet mask and default gateway also includes display and flush DNS cache,re-register the system name in DNS.This is the most useful command for viewing and troubleshooting TCP/IP problems.



  • To view ip ,subnet mask address : ipconfig
  • To view all TCP/IP information, use: ipconfig /all
  • To view the local DNS cache, use: ipconfig /displaydns
  • To delete the contents in the local DNS cache, use: ipconfig /flushdns 
  •  

2.systeminfo

Have a need to display operating system configuration information for a local or remote machine, including service pack levels? Then systeminfo is the tool to use. When I need to connect to a system that I am not familiar with, this is the first tool I run. The output of this command gives me all the info I need including: host name, OS type, version, product ID, install date, boot time and hardware info (processor and memory). Also knowing what hot fixes are installed can be a big help when troubleshooting problems. This tool can be used to connect to a machine remotely using the following syntax: SYSTEMINFO /S system /U user


3. tasklist and taskkill 

If you work with Task Manager (ctrl+alt+del) ,you can easily understand this.  Task list is list of task which are running on windows currently.  If you open any application,it will be added to task.

To List the Tasks type in cmd as :

          tasklist
 This will show the list of task which are running as shown in the picture




To stop the Process or task ,there is two methods :
Using Image Name:
   We can kill the task using its Image Name as follows:
                       tasklist /im notepad.exe

Using Process Id:
  we can stop the process using its process id as follows :
                tasklist /pid 1852




4. type
 type is used to read the text document in command prompt .  You can read multiple text in continuously

type filename.txt


5.netstat
Need to know who (or what) is making a connection to your computer? Then netstat is the tool you want to run. The output provides valuable information of all connections and listening ports, including the executable used in the connections. In additon to the above info, you can view Ethernet statistics, and resolve connecting host IP Addresses to a fully qualified domain name. I usually run the netstat command using the -a (displays all connection info), -n (sorts in numerical form) and -b (displays executable name) switches.


6.net command
Although this tool is more known as a command, the net command is really like a power drill with different bits and is used to update, fix, or view the network or network settings.
It is mostly used for viewing (only services that are started), stopping and starting services:
    • net stop server
    • net start server
    • net start (display running services)
and for connecting (mapping) and disconnecting with shared network drives:
    • net use m: \\myserver\sharename
    • net use m: \\myserver\sharename /delete
Other commands used with net command are, accounts (manage user accounts), net print (manage print jobs), and net share (manage shares).
Below are all the options that can be used with the net command.
[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |HELPMSG | LOCALGROUP | PAUSE | PRINT | SESSION | SHARE | START |STATISTICS | STOP | TIME | USE | USER | VIEW ]

7 - nslookup - With the Internet, DNS (Domain Name Service) is the key for allowing us to use friendly names when surfing the web instead of needing to remember IP Addresses. But when there are problems, nslookup can be a valuable tool for testing and troubleshooting DNS servers.
Nslookup can be run in two modes: interactive and noninteractive. Noninteractive mode is useful when only a single piece of data needs to be returned. For example, to resolve google.com:






To use the interactive mode, just type nslookup at the prompt. To see all available options, type helpwhile in interactive mode.






Don't let the help results intimidate you. Nslookup is easy to use. Some of the options I use when troubleshooting are:
set ds (displays detailed debugging information of behind the scenes communication when resolving an host or IP Address).
set domain (sets the default domain to use when resolving, so you don't need to type the fully qualified name each time).
set type (sets the query record type that will be returned, such as A, MX, NS)
server NAME (allows you to point nslookup to use other DNS servers than what is configured on your computer)
To exit out of interactive mode, type exit .

8 - ping and tracert - These tools can be helpful with connectivity to other systems. Ping will test whether a particular host is reachable across an IP network, while tracert (traceroute) is used to determine the route taken by packets across an IP network.
To ping a system just type at the prompt: ping www.google.com. By default, ping will send three ICMP request to the host and listen for ICMP “echo response” replies. Ping also includes switches to control the number of echo requests to send (-n ), and to resolve IP addresses to hostname (-a ).
To use tracert, type at the prompt: tracert www.google.comYou can force tracert to not resolve address to hostnames by using the -d switch, or set the desired timeout (milliseconds) for each reply using -w switch.
9 - gpresult - Used mostly in environments that implement group poicies, gpresults (Group Policy Results) verifies all policy settings in effect for a specific user or computer. The command is simple to use, just enter gpresults at the prompt. It can also be used to connect to computers remotely using the /S and /U switches.
10 - netsh - Without a doubt the most powerful command line tool available in Windows. Netsh is like the swiss army knife for configuring and monitoring Windows computers from the command prompt. It capabilities include:
  • Configure interfaces
  • Configure routing protocols
  • Configure filters
  • Configure routes
  • Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
  • Display the configuration of a currently running router on any computer
Some examples of what you can do with netsh:
  • Enable or disable Windows firewall:
netsh firewall set opmode disable
netsh firewall set opmode disable
  • Enable or disable ICMP Echo Request (for pinging) in Windows firewall:
netsh firewall set icmpsetting 8 enable
netsh firewall set icmpsetting 8 disable
  • Configure your NIC to automatically obtain an IP address from a DHCP server:
netsh interface ip set address "Local Area Connection" dhcp
(For the above command, if your NIC is named something else, use netsh interface ip show config and replace the name at Local Area Connection).
As you can see netsh can do alot. Instead of re-inventing the wheel, check out the following Microsoft article for more info on netsh.