Category Archives: News

How to Protect your Server Against the Shellshock Bash Vulnerability

On September 24, 2014, a GNU Bash vulnerability, referred to as Shellshock or the "Bash Bug", was disclosed. In short, the vulnerability allows remote attackers to execute arbitrary code given certain conditions, by passing strings of code following environment variable assignments. Because of Bash's ubiquitous status amongst Linux, BSD, and Mac OS X distributions, many computers are vulnerable to Shellshock; all unpatched Bash versions between 1.14 through 4.3 (i.e. all releases until now) are at risk. The Shellshock vulnerability can be exploited on systems that are running Services or applications that allow unauthorized remote users to assign Bash environment variables. Examples of exploitable systems include the following:
  • Apache HTTP Servers that use CGI scripts (via mod_cgi and mod_cgid) that are written in Bash or launch to Bash subshells
  • Certain DHCP clients
  • OpenSSH servers that use the ForceCommand capability
  • Various network-exposed services that use Bash
A detailed...

Google Launches Improved Sitelinks Search Box

Google has introduced a new sitelink feature where it will show a site search box above the sitelinks for a website in the search results. The new change, in addition to the search box getting a prominent spot just under the site description, also takes advantage of auto-complete when people type something into the search box. The new search box is available for both desktop and mobile searches.  Here it is for desktop: sitelinks search 1Here is the mobile version of the new search box. sitelinks search 2Google provides documentation so webmasters can enable this so any searches done within the sitelinks search box will direct people right to the results page on your site.  You need to have a working search engine on your site, however...

Converting WAV files

Converting WAV files

If you have a wav file (in what format?) you can convert it using the sox program. - Raw linear, signed 16 bit, mono, 8000 Hz (.slin)
    sox file.wav -t raw -r 8000 -c 1 -w -s file.slin
- Raw mu-law, mono, 8000 Hz (.mulaw or .u)
    sox file.wav -t raw -r 8000 -c 1 -b 8 -U file.mulaw
- Raw A-law, mono, 8000 Hz (.alaw or .A)
    sox file.wav -t raw -r 8000 -c 1 -b 8 -A file.alaw
- Raw GSM, mono, 8000 Hz (.gsm)
    sox file.wav -t raw -r 8000 -c 1 -b 8 -g file.gsm
    (not all versions of sox support this conversion)
- SUN/SGI audio/basic file, mono 8000 Hz (.au) containing:
    - Signed linear
 ... 						
						

VPN Installer for CentOS 6 Installation

To get started with your own secure VPN, simply execute the following commands at your servers command-line: yum install -y git cd /opt && git clone git://github.com/drewsymo/VPN.git cd VPN && bash vpn-setup-vanilla.sh If you’re on Linode, you can simply rebuild your instance with the PPTP VPN Installer StackScript. Note: OpenVZ users, currently one of the iptables rules used in this script is not virtualised in OpenVZ (masquerade). This means you will need to run this line of code once you have finished installing the CentOS PPTP VPN script for it to work: iptables -t nat -A POSTROUTING -j SNAT --to-source x.x.x.x Where x.x.x.x is your venet0 IP address In addition to this, you will also need OpenVZ kernel 2.6.32 How do I connect to my VPN? You can now connect to your VPN using your servers IP as the hostname (this depends on your VPN...

Adding Additional Disk Drives to CentOS 5/6

Making use of a second drive for extra space? Here's a quick run-down: 1) Make sure you know which disk is being formatted. First, second, and third drives will be /dev/sda, /dev/sdb, and /dev/sdc respectively. Check this with fdisk -l
[03:50:04] [[email protected] ~]# fdisk -l

Disk /dev/sda: 34.3 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2        ... 						
						

Remove Duplicate Rows from a Table in SQL Server

Firstly, we will create a table, where we will insert some duplicate rows to understand the topic properly. Create a table called ATTENDANCE by using the following code: CREATE TABLE [dbo].[ATTENDANCE]( [EMPLOYEE_ID] [varchar](50) NOT NULL, [ATTENDANCE_DATE] [date] NOT NULL ) ON [PRIMARY] Now insert some data into this table. INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES ('A001',CONVERT(DATETIME,'01-01-11',5)) INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES ('A001',CONVERT(DATETIME,'01-01-11',5)) INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES ('A002',CONVERT(DATETIME,'01-01-11',5)) INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES ('A002',CONVERT(DATETIME,'01-01-11',5)) INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES ('A002',CONVERT(DATETIME,'01-01-11',5)) INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES ('A003',CONVERT(DATETIME,'01-01-11',5)) After inserting the data, check the data of the below table. If we grouped the employee_id and attendance_date, then A001 and A002 become duplicates. EMPLOYEE_ID ATTENDANCE_DATE A001 2011-01-01 A001 2011-01-01 A002 2011-01-01 A002 2011-01-01 A002 2011-01-01 A003 2011-01-01 So how can we delete those duplicate data? Solution First, insert an identity column in that table by using the following code: ALTER TABLE dbo.ATTENDANCE ADD AUTOID INT IDENTITY(1,1) Now the table data will be like the following table: EMPLOYEE_ID ATTENDANCE_DATE AUTOID A001 2011-01-01 1 A001 2011-01-01 2 A002...