ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Internet & the Web

Internet Hacks and Workarounds

Updated on December 24, 2012

Internet Hacks and Workarounds: (Command Prompt)

This article deals with various workarounds related to Network and Internet manipulation. The procedures outlined herein will be a detailed overview of command line functionality, processes and tactics all pertaining to, and related with network and security obejectives. This guide is a general walkthrough and is intended solely for educational purposes.

Note: Results may differ depending on many factors including target machine setup, protection schemes, router/network security, third-party software and firewalls and also whether or not your workstation and the target machine, are currently connected over the same network.This guide is an overview of relevant details and information pertaining to network penetration.

Acquiring IP Address:

Obtaining IP Address Through Email:

  • If you have an email sent to you from your target. Open this email and navigate to 'View Source Code'
  • Ensure 'Advanced Details' are set to display in your mail settings.
  • You will find the senders IP address contained in the email headers and source code

Obtaining IP Address Through Instant Messenger:

  • One of the most note worthy techniques of obtaining a target IP address is by initiating an IM conversation with your target. The goal is to establish a direct connection between both machines. In our example we will be discussing the use of MSN Messenger.
  • The objective is to initiate the conversation and send the target a large file which we will track while it is being accepted and installed on the back-end.
  • You will need to download 'Wireshark' and install on your workstation. See 'Links' section for appropriate listings.
  • Begin by initiating your IM conversation. You can track activity such as messages and file transfers sent and received between both machines.
  • Configure wireshark according to the following steps:

- Run Wireshark

- Navigate to Capture/Interfaces

- Configure wireshark to monitor your ethernet controller by selecting from the list of devices

- You may specify to save output to a text file from the options screen

- Select 'Start'

  • As wireshark is sniffing network activity send your file to the target machine
  • Once the file is accepted and uploaded by the target filter for HTTP/TCP/MSNMS/FTP protocols from within wireshark console
  • The IP address will be displayed in the capture log

Obtaining IP Address Through Facebook:

In order to obtain an IP address from Facebook we must direct our target to a link that will then provide us access to it's log details where the information would be contained. This can be accomplished by creating shortened URLS to files such as weblinks and then posting these links or sharing them directly with the target user.

  • One method would be creating your own hosted web address with PHP support and then tracking your visitors via PHP coding scripts. This would create an automatic log of your visitors true ip addresses to a table in your web directory once your .php, .txt, and .html extensions are uploaded and proper coding is applied.
  • In this tutorial we will discuss the use of a free automated web-based service, available for free public utilization online. Consult links section for details. All link shorteners fill function similarly. Which ever one you prefer, you must ensure you are using a URL shortener with tracking functionality.
  • Navigate to your chosen 'URL shortener' project homepage and register for an account.
  • In the address bar on the webpage type the URL you wish to shorten.
  • The shortened link will now appear to the right.
  • You can now shorten your URL further by using 'Bitly URL Shortener' or similar services, or you may distribute and share your links via Facebook or Email.
  • Once a target has clicked the link you may view their IP address as recorded by the tracking website by clicking on the 'Hits' link located on the mainpage.
  • Some services also provide the user functionality to 'lock' their links with a password as well as other advanced features directly accessible via the online control panel.

Penetration Testing Via Telnet:

- For hacking involving Telnet this protocol must be enabled and installed on the target machine as well as your worksation.

- Enable Telnet by navigating to Programs and Features/Turn Windows features on or off

  • Check Telnet Client
  • Check Telnet Server
  • Set Startup as 'Automatic' within 'Properties'
  1. You will first need to obtain the IP address of your target machine. See above for details.
  2. Now within command prompt issue the following command: 'ping' (Followed by the IP)
  3. This command checks to ensure the host IP is currently active
  4. Upon receiving a reply from the IP address we will now scan for open ports using a Port Scanner. Nmap is a widely known, free, open-source software suite which suits this specific purpose. Visit 'Links' section of the article.
  5. Once downloaded run program and input your specified IP. Select deep, intensive, or quick scan. When results are returned search for an open Telnet port and record the port number. Default Telnet Port is 23.
  6. From command console issue the following command: telnet (ip address) (port number)
  7. You will now be asked to supply user login credentials. To breach this requirement download 'Brutus - Brute Force Password Cracker' from the links section.
  8. Select 'Telnet' as type of attack and input your wordlist/combolist specifications.
  9. Upon positive authentication results will be displayed within the program.
  10. You may connect via Telnet through command console or use a third-party software like 'Putty' that includes added functionality. Check Links for details.

Penetration Testing Via Command Prompt:

The following section will elaborate upon the most commonly used functions of command prompt when used in penetration testing and network security environments. Please refer to the table listed underneath.

This section will discuss methods and techniques relating to command prompt and the utilization of command console to accomplish specific tasks and objectives.

Common Prompts:

Command
Description
Example
ping
Used to check for an active host
ping (site url) or ping (ip address)
nslookup
Used to obtain IP from host
nslookup (site url)
tracert
A network tool to trace packets
tracert (site url)
netstat
A network tool to display inbound/outbound connections
netstat
nbtstat
A network TCP/IP utility
nbtstat
ipconfig
Used to display IP configurations on a workstation
ipconfig /all

Acquire IP Address In Command Prompt:

  • You must first initiate a direct link between the target machine and your host computer
  • For example initiate an IM conversation or file transfer with a target, either send a file to the user or await a message reply.
  • Prior to engaging your target user run the following command from command console:
  • 'netstat' - Your current TCP connections will now be displayed in a table
  • Now you may engage your target user. Once the user has accepted your transfer run 'netstat' command a second time within command console.
  • Compare differences in your results. You are looking for the entry that would have been created when your file was transferred, accepted, and received by your target user. The IP address of your target will display in the results returned.

IP Logging Continued:

As an alternative method you may utilize a free website to collect IP statistics called'iplogger.org' Link is available in the appropriate section of this article.

IPlogger.org performs a variety of tasks including;

  • Generating IP logging weblinks
  • Generate IP logger hidden behind a picture image
  • Create IP logger for use in many other situations including;
  • On a webpage
  • In a signature
  • In a blog post
  • In a forum post
  • In an instant message conversation
  • Also provides capability to create an invisible IP Logger for use with the above resources

Command Prompt Continued:

Another method is to query a specific URL address when you are connected to a network intranet among many machines. For example;

  • Run command console and execute the following;
  • tracert www.hostname.com
  • This will provide a list of users on the network that are currently connected to the specified web address
  • The IP addresses of these workstations will be displayed in the console window
  • OPTIONAL: From command line issue the following;
  • shutdown -i
  • You will be presented with a popup dialog box titled 'Remote Shutdown Dialog'
  • From here select 'Add'
  • Now configure the target IP and add to the list
  • Fill out your system shutdown preferences. The user will be forced closed and the target machine will be shutdown upon confirmation

Resources:

If you wish to obtain further details about a target IP Address a few useful resources are included in the links section that provide various details including, but not limited to;

  • Geolocation including longitude and latitude coordinates
  • On screen map
  • Service provider (ISP)
  • Area code

Please reference links section titled IP-Tools for further details.

Unblock Websites In Command Prompt:

The ability to unblock websites is quite useful when working within restricted work environments where access is limited and controlled.

  • Within command console issue the following command:
  • ping (www.hostname.com)
  • Take note of the IP address returned (This will be displayed in the 'reply-from' section of the results)
  • Confirm the result by inputting the following command in console;
  • nslookup (www.hostname.com)
  • Enter your recorded IP address into your browsers address bar

Blocking Websites: Command Prompt

Alternatively you may also block websites from access via command console. Open your console and execute the following line of code;

  • ' notepad C:/Windows/System32/drivers/etc/hosts'
  • Ensure your account has appropriate read/write privileges to save within this file
  • Find the line which lists the following;
  • 127.0.0.1 localhost
  • Directly underneath this line you will add the following line;
  • 127.0.0.1 (www.hostname.com)
  • (hostname.com) will be the site that you wish to revoke access to
  • Ensure you have listed '127.0.0.1' before the website you wish to block on the same line
  • Save your changes. Upon attempting to browse to the blocked site your browser will notify that the URL is unavailable.
  • Alternatively you may remove blocked entries from this list to allow access on the machine. Or find the IP of a given hostname and create a seperate line listing the IP address of the blocked site followed by the URL-Address of the blocked webpage in the same format listed above. Exit savings changes and your blocked page will become available.

Acquire SMTP Server Address In Command Prompt:

This is the final section of the article and will detail how to obtain the SMTP server details of a specific host name.

  1. Begin by opening command console
  2. Type the following command;
  3. nslookup
  4. Now issue your next command;
  5. set type=mx
  6. Now specify your target host for example yahoo.com
  7. Your results will display with a list of server address's pertaining to the host specified
  8. Run nslookup (ip address) for further details regarding a specific server
  • This completes the tutorial. Thank you for viewing.

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      regzooka review 4 years ago

      Really good website! I am grateful you actually took the time to write it. I've really been trying to find this material forever and finally my query has finished! regzooka review

    • profile image

      Graeme W. 4 years ago

      Perfect introduction to various methods... Thanks a lot for the article!