A variant of the shellshock bug that still works with the bash 4.3.11 shell.

This is a variant of the shellshock bug for bash that still works on a patched system. I am using Ubuntu 14.04 and this still works for me. env VAR1=’me() {echo "hello"}\ ‘ /bin/touch /home/$LOGNAME/my.textenv VAR1=’me() {echo "hello"}\ ‘ /bin/touch /home/$LOGNAME/my.text So you can still put arbitrary content after the function definition in a bash … Read more

Shellshock bug a wake up call for all Linux users, but not the end of the world.

The shellshock bug for Linux is a wake up call for all Linux administrators and home users, but this is not the end of the world. The Linux distribution developers will issue patches very soon after a leak of a bug like this. There is not going to be a massive catastrophe that the media … Read more

Check if you are vulnerable to the shellshock bug. This is an easy way to find out.

A vulnerable cygwin shell. Using the shellshock vulnerability to run ls in cygwin. Homer@bejiitas ~ $ x='() { :;}; `/bin/ls -hula`’ bash -c : bash: total 53K drwxrwxr-x+ 1 Homer Homer 0 Sep 26 18:38 . drwxrwxrwt+ 1 Homer Homer 0 Sep 26 2013 .. -rw-rw—- 1 Homer Homer 222 Sep 26 2013 .bash_history -rwxrwxr-x … Read more

How to upload files to your Amazon AWS instance using the bash shell and sftp.

This is how to copy files from the local machine to your Amazon instance when you are logged into the EC2 instance via SSH. Firstly, connect to the remote AWS instance by SSH. Then use the sftp command to connect back to your local Linux machine. sftp -P 443 [email protected] -P 443 [email protected] Then, you … Read more

How to change the shell for a user on a Linux system easily with the usermod command.

I recently created a new user with the adduser command. homer@deusexmachina:~/Documents$ sudo adduser jimkirk Adding user `jimkirk’ … Adding new group `jimkirk’ (1002) … Adding new user `jimkirk’ (1002) with group `jimkirk’ … Creating home directory `/home/jimkirk’ … Copying files from `/etc/skel’ … Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully … Read more

How to see free memory on a Linux machine with the free command.

The free command in Linux is used to show the amount of free memory in Linux. The example below shows the default usage of this command. ubuntu@ip-172-31-0-140:~$ free total used free shared buffers cached Mem: 602736 294680 308056 16928 17632 146320 -/+ buffers/cache: 130728 472008 Swap: 0 0 0ubuntu@ip-172-31-0-140:~$ free total used free shared buffers … Read more

More awesome wallpapers for your Linux or BSD desktop.

More awesome wallpapers for a Linux or BSD desktop. The wallpapers. Pandora and orbiting spaceship: http://wallpaperswide.com/download/avatar_6-wallpaper-1920×1080.jpg. Astronaut with surfboard on alien planet: http://4walled.cc/src/98/98fad31467a2205977988e458b554821.jpg. Awesome planet wallpaper with a giant superstructure on it: http://4walled.cc/show-1281760. Astronaut having a beer on the Moon: http://4walled.cc/show-1171862. Awesome view of planet Earth and the Milky way galaxy: http://4walled.cc/show-1124548. The sun rising … Read more

How to use scp to download files from a remote machine over a secure encrypted connection.

This is the sample command I am using to download my OpenVPN keys from a remote VPN server to allow me to setup a local connection. And to backup the keys safely. [1]homer@deusexmachina ~ $ scp -i Goku.pem -P 443 [email protected]:/home/ubuntu/easy-rsa/keys/*.* /home/homer/vpn/ 01.pem 100% 5589 5.5KB/s 00:00 ca.crt 100% 1736 1.7KB/s 00:00 ca.key 100% 1704 … Read more

Basic text filtering with sed. Very useful when you are manipulating text files.

This example uses sed to replace the beginning word of a sentence. Administrator@WIN-EM8GK0ROU41 ~ $ echo "this is a line of text." | sed "s/this/This/gi;" This is a line of text.Administrator@WIN-EM8GK0ROU41 ~ $ echo "this is a line of text." | sed "s/this/This/gi;" This is a line of text. This is a better way to … Read more

Some miscellaneous Linux tips for Ubuntu and Linux Mint users.

If you are starting Firefox from a terminal window where you have specified the proxy settings, and you have the use system proxy settings option ticked, you will not need to set the proxy within Firefox. That is a very cool tip indeed. If you need to set the proxy before using apt, you will … Read more

How to connect to a Windows machine using RDP from a Linux machine using bash.

The rdesktop utility for Linux allows easy remote desktop access from a Linux machine. Type: sudo apt-get install rdesktop to install this useful utility and then type: rdesktop 192.168.100.5 to connect to a remote machine. Specify the username with the -u parameter: rdesktop -u homer 192.168.100.5. If you wish to use RDP in full-screen; enabling … Read more

Some very useful networking tricks for Linux/UNIX users.

Get your gateway IP address with curl on the command line. [homer@localhost ~]$ echo $(curl -# http://ipecho.net/plain) ######################################################################## 100.0% 153.107.97.164[homer@localhost ~]$ echo $(curl -# http://ipecho.net/plain) ######################################################################## 100.0% 153.107.97.164 Another way to list the IP addresses of your network interfaces. Using the ip command. [homer@localhost ~]$ ip a | grep inet* inet 127.0.0.1/8 scope host lo … Read more

Useful networking commands for listing open ports and listening services.

To print a list of all open ports and established TCP connections, type this command. homer@deusexmachina /etc/asterisk $ netstat -vatn Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:4101 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 … Read more

A useful script for gaining information about your Ethernet adapter.

This useful shell script will print information about your Ethernet or Wireless adapter. This is very useful for getting a lot of information at once. #!/bin/sh   DEV="eno16777736"   echo "Showing information for the active network interface: $DEV."   echo -e "-*- \e[1mGet timestamping information for your Ethernet device.\e[0m -*-" echo   ethtool -T $DEV … Read more

How to open an RDP connection to Windows from Linux using the remote desktop utility for Gnome.

Opening a Remote Desktop connection from Linux to Windows is very easy when you are using the Remote Desktop utility for the Gnome 3 desktop. This is a very easy RDP application for Linux. Below I am entering the details for a new connection. Just go to Applications->Internet-Remote Desktop Viewer to open this useful utility. … Read more

Amazon web services. The perfect alternative to a locally hosted server solution.

Amazon Web Services is the perfect solution for hosting a server outside your organization. This allows you to create a cloud hosted database server that takes the strain off your local server infrastructure using Microsoft SQL server 2012 or a Linux based solution in a cloud hosted server instance. There is a free trial that … Read more