How to setup NTP on Ubuntu to set the system time automatically.

To install NTP on Linux and update the system time automatically from the Internet, firstly install the NTP client. jason@darkstar:~$ sudo apt-get install ntpjason@darkstar:~$ sudo apt-get install ntp Then install the ntpdate utility. sudo apt-get install ntpdatesudo apt-get install ntpdate Then you may synchronize the time on your machine with the Internet time server. jason@darkstar:~$ … Read more

More commands to get information about your network adapter.

There are a few commands available in Red Hat Linux to get information about your network adapter. Here are a couple. The ifstat command returns information about the network throughput of your adapter. [jason@darknet ~]$ ifstat #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate lo … Read more

Firefox tips and tricks for habitual Internet users.

To open the Firefox developer tools, press Ctrl-Shift-K. This is good if you have Firebug installed, as F12 will open it instead. To take a full-page screenshot of a web site, press Shift-F2 and then type this command and hit press ENTER. screenshot –fullpagescreenshot –fullpage This will be saved in the ~/Downloads folder by default. … Read more

How to display excerpts in WordPress posts.

To display post excerpts in WordPress, put this code in the index.php <?php if(is_single() || is_page()) { ?> <?php the_content(__('(more…)’)); ?> <?php } else { ?> <?php the_excerpt(__('(more…)’)); ?> <? } ?><?php if(is_single() || is_page()) { ?> <?php the_content(__(‘(more…)’)); ?> <?php } else { ?> <?php the_excerpt(__(‘(more…)’)); ?> <? } ?> This will display full … Read more

How to set an IP address for a VLAN on a Cisco 2960G switch.

To set an IP address on a VLAN on a Cisco switch, firstly access the configuration section for the VLAN in configuration mode. arya(config)#interface vlan 1arya(config)#interface vlan 1 Then the administrator may set an IP address for the VLAN. arya(config-if)#ip address 172.18.31.210 255.255.255.0arya(config-if)#ip address 172.18.31.210 255.255.255.0 Then you are all set. To save the running … Read more

Get Prolific USB-serial adapter working with Windows 8.

Getting the Prolific USB serial adapter working with Windows 8 can be difficult. Especially if you are studying for CCNA and you need to access a 2960G switch on Windows with Putty. As strange as it may look, you need an outdated driver to make it work. The only working version I have found is … Read more

How to crack a SHA512 Linux password hash with oclHashcat on Linux.

Cracking a SHA512 Debian password hash with oclhashcat on Debian 8.0. I am using a Radeon HD6670 card and I created a user with the crappy password of “password”. Then I downloaded oclHashcat 1.37 and used this to crack the password using the GPU. This is the password hash in the /etc/shadow file. fred:$6$5l70Gupv$xBTxhCSexudn5jJ9hampIfTK0KIR3nqK1K1Rxye.OA5obtKArO7jgftjJtVSdp31MPxItEPmOuWhbgBvp0wqn.:16737:0:99999:7:::fred:$6$5l70Gupv$xBTxhCSexudn5jJ9hampIfTK0KIR3nqK1K1Rxye.OA5obtKArO7jgftjJtVSdp31MPxItEPmOuWhbgBvp0wqn.:16737:0:99999:7::: The … Read more

Mandatory data retention laws passed the senate this week.

Mandatory data retention laws passed the senate this week. The premise is to fight against Islamic terrorist attacks by retention of ISP customer data. But this will not work out right from the start. ISP`s are confused by the 400 page document that outlines what they must retain, and they are not ready to capture … Read more

Search for a specific package with dnf on Fedora 22.

To find a specific package that offers a certain file, the whatprovides parameter to dnf will do what you wish. Here is an example, I am looking for all packages that provide the vim command. [jason@hackerbox Documents]$ dnf whatprovides "*/vim" Last metadata expiration check performed 26 days, 19:55:19 ago on Tue Sep 15 12:49:19 2015. … Read more

Adding a default route in Linux. How to define the default gateway.

Adding a default route in Linux is easy. The route command is the best way to do this. ~# route add default gw 172.18.31.1~# route add default gw 172.18.31.1 I used this command on a machine that previously had an IP address in the 192.168.0.xx range and the default gateway was 192.168.0.1. So I had … Read more

How to scan a network for responsive hosts using Kali Linux.

To scan a network for hosts using Kali Linux, the netdiscover command will come in handy. Just give it an IP address and it will find all hosts within that range. I am scanning for all hosts within the range of 172.29.59.1 to 172.29.59.254. root@kali:~/Documents# netdiscover -r 172.29.59.0/24   Currently scanning: Finished! | Screen View: … Read more

How I got the Internet connection working in Ubuntu server 14.03.

I installed Ubuntu server 14.03 in a Virtual Machine and after installation the Internet connection was not working. To fix this I added the nameservers to the /etc/resolv.conf file like this. nameserver 8.8.8.8 nameserver 8.8.4.4nameserver 8.8.8.8 nameserver 8.8.4.4 After saving this file, I ran this command. sudo service resolveconf restartsudo service resolveconf restart This fixed … Read more

Enable copy and paste to and from a VMware Kali Linux instance.

Kali Linux runs very well in a VM, but having copy and paste to and from the Virtual Machine is very helpful. To get this working in VMware Pro 12, install these packages. Firstly, this one. root@kali:~# apt-get install open-vm-toolsroot@kali:~# apt-get install open-vm-tools Then this one. root@kali:~# apt-get install open-vm-tools-desktoproot@kali:~# apt-get install open-vm-tools-desktop Then copy … Read more

How to install Ubuntu server and setup a simple LAMP instance.

Installing Ubuntu server is quite straightforward. Firstly, choose the language. Then the user needs to choose what country they are in. And choose what keyboard layout you are using. After this is out of the way, we get to the main installation tasks. We need to choose a hostname for our server instance. Now we … Read more

A simple shell script to create a new Linux user account.

This simple script will help create new user accounts on a Linux system. This is very useful when administering a Linux machine and it is necessary to create a few user accounts. #!/bin/bash   clear   trap "" SIGHUP SIGINT SIGTERM SIGTSTP   # Get username, check if its taken, and if it is the … Read more

Simple Linux commands to get information about your system.

This simple command will print the remaining free space on your hard disk. root@ip-172-31-20-16:~# df -Hla Filesystem Size Used Avail Use% Mounted on /dev/xvda1 32G 9.6G 21G 32% / proc 0 0 0 – /proc sysfs 0 0 0 – /sys none 4.1k 0 4.1k 0% /sys/fs/cgroup none 0 0 0 – /sys/fs/fuse/connections none 0 … Read more

Why you should always turn off WPS on your wireless network.

Many people are using wireless networks with WPS turned on. This allows a user to enter a pin or press a button to allow a new device to connect. But this approach will fall easily to brute force attacks unless the router has rate limiting enabled, this prevents brute forcing the WIFI, although even this … Read more