What's new

Closed Linux basics for the aspiring häçker: using ship for quick and handly ip address information

Status
Not open for further replies.

JussayFinnn

Forum Veteran
Elite
Joined
Jul 9, 2017
Posts
1,855
Reaction
2,254
Points
863
Whether you're white hat, black hat, or some shade in-between, navigating through a network is a core part of häçking. To do that, we need to be able to explore a network to discover the addresses of gateways, interfaces, and other attached devices. When ifconfig just isn't enough, you can steer your way around a network with a convenient tool called Ship, the script for everything IP.

What Is Ship?

Created by You do not have permission to view the full content of this post. Log in or register now., Ship is a portmanteau of "shell" and "IP" and it's literally a shell script that displays network addresses. However, that description doesn't really give it justice. Ship is a very handy tool. I like to think of it as a one-stop-shop for basic network You do not have permission to view the full content of this post. Log in or register now. and addressing.

Using Start-Up Scripts in Linux

You do not have permission to view the full content of this post. Log in or register now., so the commands may be slightly different if you're using Kali or another Linux distribution.

Depending on what repositories your package manager checks, you might be able to install Ship directly with a simple apt-get or equivalent command. On my system, this wasn't the case, so I'm going to detail how to install Ship manually.

You do not have permission to view the full content of this post. Log in or register now.

First, we need to install the appropriate dependencies. To do this, use the following command in Black Arch.

pacman -S gawk grep iproute2 mtr iputils sed traceroute wget

If you're using a Debian-based system like Kali, this command should work the same if you replace pacman -S with apt-get install and iputils with iputils-ping.

In my case, all of these packages were already installed, but it doesn't hurt to check. If you already have them installed like I did, the command will update them instead, which is always a good thing.

-ship-for-quick-handy-ip-address-information.w1456.jpg
You do not have permission to view the full content of this post. Log in or register now.

-ship-for-quick-handy-ip-address-information.w1456.jpg
cd /root/ship and then copy ship.sh and rename it to ship by typing cpship.sh ship into a terminal window.

This lets us type ship instead of having to type ship.sh. Then, to add it to the PATH variable everytime the terminal runs, by typing:

echo 'export PATH=/root/ship:$PATH'>>~/.bashrc

-ship-for-quick-handy-ip-address-information.w1456.jpg
Step 2Using Ship for Quick Addressing
Now that we've installed Ship, let's browse some of its features. One of Ship's most handy uses is that it can quickly serve up the exact information about the network we need without displaying superfluous information. For instance, if all we want is to find just the name of the active network interface connected to our device, type ship -i.

You can see in the picture below that my laptop's internal wireless adapter is called wlo1. If we also want that interface's IP address, type ship -4 or ship -6 for IPv4 or IPv6 addresses, respectively. We can also find the internal (private) IP address of the network gateway by typing ship -g.

-ship-for-quick-handy-ip-address-information.w1456.jpg
-ship-for-quick-handy-ip-address-information.w1456.jpg

In addition, you can quickly see what your external IP address is by typing ship -e. You can also use this same command with a URL to find the IP address associated with website by typing ship -e url, with "url" replaced by the site you want the IP address of.

-ship-for-quick-handy-ip-address-information.w1456.jpg
-ship-for-quick-handy-ip-address-information.w1456.jpg-ship-for-quick-handy-ip-address-information.w1456.jpg

I tried using this command with multiple different IP addresses of various classes. Ship labels whether the IP address belongs to a private network and whether it belongs to class A, B, C, D, or E.

One thing to note is that you can use this command with CIDR notation. For instance, when I type 10.1.1.1/16, it correctly calculates the network mask to be 255.255.0.0 and the max number of hosts to be 65,534, as opposed to the standard 255 in a normal class C 198.192.x.x/24 type network. This can tell us a lot about the purpose of the network we're examining.

Ship Can Answer Network Questions
If you're new to networking or need to navigate through an uncharted network, Ship is like a compass to show you what's out there and how to get where you want to go. With a few simple commands, even a beginner can discover connected devices and quietly gather information about a network and the way it is administered. Ship makes it easy to find the network information you need for other commands, down to the driver being used by each network interface.

Keep in mind, Ship organizes other tools that do the behind the scenes work. Some of these tools can leave logs in the router, firewall, or intrusion-detection system. While scanning generally isn't îllégâl, it's often seen as a preparation for an attack and can get you blocked from a well-defended network.


Original tutorial: https://null-byte.wonderhowto.com/h...r-quick-handy-ip-address-information-0181593/

Nice ba guys!!
Follow me: SF44_NET
 

Attachments

Status
Not open for further replies.

Similar threads

Back
Top