Author Archives: Randy

mod_security rule for e107 ‘plugindir’ and ‘ifile’ remote include vulnerability

Here are modsecurity2 rules for the latest string of vulnerabilities affecting the E107 CMS system described in the following links: http://www.exploit-db.com/exploits/12818/ http://www.exploit-db.com/exploits/12715/ SecRule ARGS:THEMES_DIRECTORY “^http” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'” SecRule ARGS:ifile “^http” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'” SecRule ARGS:plugindir “^http” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'” SecRule ARGS:author_name “\[php\]” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'”

Remotely installing PFSense to hard drive with VGA and without CD-ROM

FreeBSD is great for certain tasks (such as firewalls and other embedded devices), but has some real shortcomings when it comes to booting from attached or remote storage. This severely complicates the installation process in some cases. In my case, I have a remote server in a rack with no CD-ROM. Pulling the server from […]

Arbitrary MIME support for aacplus streaming with libshout and perl bindings

If you want to be able to support alternative stream types (such as AACplus) using libshout-2.2.2, you’ll need a patch to add a ‘mime’ method. You can then manually set the mime-type for arbitrary stream types. I also included a minor change which sends ‘content-type’ headers to Shoutcast/ICY stream servers, which is required for Shoutcast […]

Decrypting a SSL Server Key for importing into Cpanel

In case someone accidentally encrypts a server key (e.g. not following directions) then expects it to be accepted in to Cpanel, you’ll need to decrypt it first. Most web hosting platforms (like Cpanel) need the server key to be in clear text. The private key can be decrypted with: openssl rsa -in encrypted.pem -out plaintext.key […]

Categories: Linux and Technical. Comments Off on Decrypting a SSL Server Key for importing into Cpanel

Automatically purge old voicemail on Asterisk/FreePBX/Trixbox

Run this nifty Perl script daily or weekly via cron. This will keep your voicemail from overflowing and unknowingly rejecting new voicemail. #!/usr/bin/perl # # Script to expire voicemail after a specified number of days # by Steve Creel # # Directory housing the voicemail spool for asterisk $dir = “/var/spool/asterisk/voicemail”; # Context for which […]

Windows Vista / Windows 7 / Server 2008 R2: 0xc0000225 after resizing partition or restoring backup

So I needed to shrink a C: partition of a Windows 7 (Server 2008 R2) machine.  After shrinking with Gparted (my open-source partitioning tool of choice), Windows no longer booted, with the boot manager complaining of 0xc0000225 (awesome error message as usual, Microsoft). To get things working again, it was necessary to execute the following […]

Installing RED5 Server on CentOS

First, download, extract and install: mkdir /usr/local/red5; cd /usr/local/red5 wget http://www.red5.org/downloads/0_8/red5-0.8.0.tar.gz tar -zxf red5-0.8.0.tar.gz Install JAVA: wget -O java.rpm.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=38657 chmod 755 java.rpm.bin; ./java.rpm.bin Open new init script: nano -w /etc/init.d/red5 Paste into init script: #!/bin/sh # For RedHat and cousins: # chkconfig: 2345 85 85 # description: Red5 flash streaming server # processname: red5 […]