Jump to content
Hak5 Forums

Archived

This topic is now archived and is closed to further replies.

Fallen Archangel

Using the Pineapple Without Modules or Infusions- Part One - SSH

Recommended Posts

At the time of this writing, the new developer version of the NANO has been released, and there are a lot of questions about how to use the Pineapple without modules. To do this, I'm going to show you how to use SSH in order to control the pineapple.


Requirements:

  • Network connection to pineapple (Ethernet, USB, or WiFi)
  • Complete the initial setup.
  • Kali Linux ( Can be done on Windows, Mac, and Android as well using different apps, not sure about iOS)

Let's begin!

The first thing we need to do is connect to our pineapple. In order to do this, we need to know it's IP address. If you are connected directly to the Pineapple by Ethernet (Or USB on the NANO), then the default IP address will be 172.16.42.1.

Now that we know the address, we need some way of communicating with it. We will be using SSH.
What is SSH? (In my non-technical terms) ->



If you're familiar with windows, you've probably heard of Command Prompt, the black window you type commands into, like ipconfig.
Linux has its own version of this, and when we are using SSH we are basically using the Linux command prompt remotely. If I were to leave my Linux computer at home while I went on vacation, I could connect to it with SSH and run commands as if I were at home.



Next, we need to open up Terminal. 5c25eb05e47f5e1f7df7c9d90a26d6b2.png On the default install of Kali, you will find this on the favorites bar on the right. Otherwise, you can go to Applications->Usual Applications->Utilities->Terminal

Once you click on the icon, a black box will open, similar to the command prompt in windows. To start an SSH session with the pineapple, we need to enter the following command


ssh [email protected]

Then it will ask you for the root password of your Pineapple. (The one you made in the initial setup)
If this is your first time, it will likely ask you to verify a fingerprint just type 'y'.

Let me break this down a bit.

ssh root@172.16.42.1

'ssh' tell terminal what program you are wanting to use.
'root' is the user you are going to log in to.
'172.16.42.1' is the IP address you are connecting to. (Your Pineapple in this case)

Once you have done that, you will still be in a black box. This time however, the text on the top left will be [email protected], and on the MK5 The word WiFi Pineapple will be displayed in large letters. (I'm not sure on the NANO)

Now we are connected to the Pineapple. Any commands we type on this page are actually happening on the pineapple.

"Okay, but now what?"
Well now we need to learn about some general linux command line. If you find this boring, feel free to skip to my next tutorial which is going to show you how to do the stuff you'll actually be interested in. If you can manage however, continue reading and it will be better for you in the long run. It's not directly related to the pineapple, but it's good general knowledge of the linux command line.


Now that we are connected to our pineapple, lets just run a few commands to get used to it.

First let's run

ifconfig

This command is a lot like the 'ipconfig' command in Windows. It will show you all of the network devices attached to your pineapple, and some information on them. I haven't ordered mine yet, so I'll be using my laptop. Yours won't look exactly like mine, but it will be close.

a57264653dfe131553823e165926990c.png

There are three main connections you will be looking for.
Eth0 is your Ehernet connection. (USB on the NANO)
Wlan0 is your first wifi adapter
Wlan1 is your second wifi adapter

Again, just for practice, lets try turning one of them off, then checking again:

ifconfig wlan1 down
ifconfig

f0796e018f2626adb16f6306dc1f443c.png

Again, let's break this command down a bit.

ifconfig wlan1 down

ifconfig is the name of the program we are using.
wlan1 tell it which device we are choosing.
down tells it what we want to do to that device.

To turn the wifi card back on, all we have to do is run:


ifconfig wlan1 up

Now that we are down with that we can just run

clear

To clear the page and get rid of all the clutter.

Next we are going to look at some basic directory traversal.

The first thing you need to do is to get your bearings. to do this, simply run the command

ls

Which will list all of the directories(folders) and files where you are.
Again, mine will be different than yours.

8e7d5964b4ab4c7b805843443584746c.png

One thing to notice is that all of the directories(folders) are blue, and all of the files are white.

In order to move around, we will be using 'cd' which stands for Change Directory. As I said before, yours is different. I will be going into the lmms folder. Your device probably won't have this folder, so just choose the first one you see.

To open the lmms folder and check what's inside, I will be running

cd lmms
ls

Just Change lmms to the name of whichever folder you choose.

18c2f59b2ec75adce6ca8ec074832a57.png

As you probably know by now:

cd lmms
ls

cd is the name of the program we are using.
lmms tell it what folder we are doing it on
ls shows what's inside the folder we are in.

In case we ever forget which folder that is, you will notice that it has been added (in blue) to the left of where we are typing.


Next, go back up a directoy (Back to the place we were before), we use

cd ..

(There is no space in between the periods, it just appears that way on some screens.)

Now, if we run ls again, we will see that we are back where we were before.

c7580e39096e9d33fbe26f5119fd7b96.png


I will be ending part one here. In part two, I will show you how to sniff wifi packets, and do cool stuff.

In order to exit the SSH session you run:

exit

Honestly I just click the X button myself, but technically this is the correct way.

In case these pictures get removed from Gyazo, I have also uploaded them here: http://www.mediafire.com/download/bfqub6t4kvuy4ao/SSH.zip

I recommend you learn more about command line while you wait for my next post :p

http://linuxcommand.org/learning_the_shell.php

http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything

https://www.linux.com/learn/tutorials/819973-how-to-use-the-linux-command-line-basics-of-cli


Part Two

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×