Browse Tag: how to

How to change your SSH Port on the Raspberry Pi

About: The latest version of Raspbian disables SSH by default to improve security of the Raspberry Pi. This is a great step of improving internet and network security and I congratulate the Raspberry Pi team for moving forward with this step and making it super easy to enable SSH by simply adding a file called “ssh” into the /boot/ directory.

Enabling SSH allows you to use your Raspberry Pi headless, meaning you can use it without a keyboard and monitor by connecting to it from another computer. The problem still persists that if you have SSH enabled on port 22 hackers can still scan your network looking for an open port 22. They can then attempt to enter your network from the Raspberry Pi and attempt to brute force your username and password.

Changing your SSH port will increase your security assuming a hacker scans your network for default ports only. You will still need to have a secure password and think of using SSH keys to improve security even further. Changing your port number will simply decrease the amount of probe attempts on your port. A non-standard port means that you don’t automatically show up in Shodan or other places that list machines listening on port 22.

Objective: To change our default SSH port number from 22 to another random port number to increase security

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $37 with free shipping)

Instructions: Let’s start off by opening the terminal on your Raspberry Pi or by connecting to it over SSH

Continue Reading

How to Phish Usernames and Passwords from a Rogue Access Point using the Raspberry Pi

About: Setting up a Rogue Access Point on the Raspberry Pi is very easy. Our Access Point will act as a fake network providing free WiFi for our victim. It will have a captive portal which means any website that a user visits will be redirected to our login page where they will need to enter in their credentials to login. You can set the login page up to look like a Facebook or Google login page and name your network “Free Facebook WiFi”. The network I am setting up will not have any internet so everything will be contained on the Raspberry Pi. You can eventually bridge your connection with a 4G network or Ethernet to provide full internet access for users.

The tutorial today will demonstrate how unsafe public WiFi’s are and to never send any personal information over a public WiFi network. We can also setup our Access Point SSID to “attwifi” or “Starbucks”. If you set your access point’s SSID to a popular WiFi SSID then your victims phone will automatically connect to your network if they have been connected to the same SSID before.  The reason for this is that your phone just looks at SSID names and not a MAC Address for a wireless network. This doesn’t apply to phones only, laptops or any WiFi enabled devices will all act the same way.

Objective: To setup a Rogue Access Point and make our network act as a Captive Portal to Phish Passwords

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $36 with free shipping)
  • USB Wireless Adapter (I use the Alpha AWUS036H in this tutorial)

Instructions: Lets start off with a fresh Raspbian install. I installed Rasbian-Lite on my Raspberry Pi since I will be running it headless and will use SSH to connect to my Raspberry Pi.  After you setup your Raspberry Pi lets run the update and upgrade Continue Reading

How to disable WPS on the Netgear WNDR4500 Router

About: WPS stands for Wi-Fi Protected Setup and it is a wireless networking standard that tries to make connections between a router and wireless devices faster and easier. It works only for wireless networks that have WPA/WPA2 security. That’s great, however there is a problem with WPS, it can easily be cracked and allow a hacker access to your home WiFi network.

WPA2 security is very secure and there really is no way of hacking WPA2 without using a dictonary attack which can take months depending on the hardware you are using to bruteforce. It can also be a waste of time if your password is very long and includes many special characters, however if you have WPS enabled on your router (which it usually is by default) there is a faster way to hack your WiFi and it can be usually done in a maximum of 12 hours.

Objective: To disable WPS on our Netgear WNDR4500 router to improve WiFi security.

Material: You will need the following:

Instructions: You will need to begin by opening your browser and typing in the IP address for your router. The default is usually http://192.168.1.1 on Netgear routers. Type in the username and password. The default username is ‘admin’ and the default password is ‘password’.

Login screen for the Netgear WNDR4500 Router

Continue Reading

How to schedule Cron Jobs on the Raspberry Pi

About: I have recently been working on a MMORPG turn based text game and needed a way to run a php script every 2 hours to generate a turn. Since I use the Raspberry Pi as a LAMP server for testing out my game before releasing official updates I figured it would work well as a cron job to call a website page every 2 hours.

You can schedule many types of cron jobs using your Raspberry Pi. Cron is basically the Linux version of the Windows Task Scheduler. You can schedule commands to run at certain times of the day or only run once a month. The shortest time a cron job can run is 1 minute in between commands. If you need a command to repeat every 30 seconds then a cron job will not work.

Objective: To create and schedule a cron job using the terminal on the Raspberry Pi

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $36 with free shipping)

Instructions: Open up a terminal window and type the following command to create a cron job

Continue Reading

How to connect your Raspberry Pi 3 to a WiFi network using the terminal

About: I recently purchased a Raspberry Pi 3 and was excited to learn that it comes with Bluetooth and WiFi built-in. Since I will be using this Raspberry Pi as a server I will be running it headless so it will not have a monitor. I will connect to the Raspberry Pi over SSH. The Raspberry Pi I will be using is running Raspbian Lite but will also work on the GUI version of Raspbian.

Objective: To connect your headless Raspberry Pi 3 to your WiFi network.

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $36 with free shipping)

Instructions: Go ahead and connect to the Raspberry Pi over SSH and login to the Raspberry Pi. The default username and password is ‘pi’ and ‘raspberry’.  Continue Reading

How to make a custom PCB to make your Arduino Projects permanent

About: There may come a time when you create an awesome Arduino project and want to make it permanent. Sure you can leave it on your breadboard but you will have to be careful not to touch any of the wires or drop your board or unplug any of the connections. I will show you how quickly you can design and make your own custom printed circuit boards (PCB’s). The process is easy and any one can do it. Making your own printed circuit board will make your project permanent and more durable. This does not only pertain to Arduino projects. Any project you design on your breadboard can be transformed onto a PCB. I will be showing you how to make a single sided PCB in my demonstration but you can easily make a double sides board if you line up everything correctly.

Objective: To make a custom printed circuit board at home and making our Arduino projects permanent and durable

Material:

Instructions: You’ll first need to design or download a schematic and design it to fit your PCB board. I use Fritzing. It’s a little outdated and I am not even sure if it is being worked on anymore but it is super easy to use and is designed to be used by hobbyists and Arduino’s. Below is what my PCB design will look like.

Continue Reading