Tuesday 28 August 2012

Gimp 2.8 Updated With More Features

The GNU Image Manipulation Program, GIMP, has been released with several new features and fixes. GIMP 2.8 features is equipped with several useful features including single-window mode which is probably one of the highly requested features and the latest v. 2.8.2 provides few more bug fixes and updates.

GIMP developers had released the stable release of GIMP back in May and GIMP release note states that the new release is a result of 3 years of collaborative inputs from the people all around the world.


Among all the improvements, the single window mode feature is one of the most awaited features. You can now toggle between the default multi-window mode and the new single-window mode through the Single-window mode checkbox in the Windows menu. In single-window mode, GIMP will put dockable dialogs and images in a single, tabbed image window.

There are several additions and improvements in user interface, tools and plugins. Likewise, several API has been refactored to ease the script development easier and better. Also, the GIMP license has been changed to (L)GPLv3+ from now onwards.

Similarly, several bugs have been fixed including the most notable ones such as not being able to remember JPEG saving options, slow canvas redraw and not showing page setup options on Windows.

GIMP is available for download from ftp://ftp.gimp.org/pub/gimp/v2.8/. You can also choose any other mirror suitable for you.

The release note provides a information on installation of GIMP 2.8.

You can also install GIMP 2.8 on Ubuntu 12.04 using PPA. Fire up the terminal and just type the following commands:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp


Read more...

Hack Attack The Networks With Yersinia

Yersinia is a network attack tool that takes advantages of inherent weaknesses of several protocols to attack the network using different attack vectors. Yersinia can prove as a solid tool for analyzing and testing the deployed networks and systems for possible weaknesses.

The protocols implemented for testing using Yersinia are:

  • Spanning Tree Protocol (STP)
  • Cisco Discovery Protocol (CDP)
  • Dynamic Trunking Protocol (DTP)
  • Dynamic Host Configuration Protocol (DHCP)
  • Hot Standby Router Protocol (HSRP)
  • IEEE 802.1Q
  • IEEE 802.1X
  • Inter-Switch Link Protocol (ISL)
  • VLAN Trunking Protocol (VTP)

Yersinia supports number of attacks in all of the above listed network protocols and hence can be used (or misused) to test any network.

The tool works on several operating systems such as OpenBSD 3.4 (with pcap libraries >= 0.7.2), Linux 2.4.x and 2.6.x, Solaris 5.8 64bits SPARC, Mac OSX 10.4 Tiger (Intel), etc.

Installation on ubuntu: Fire up the terminal and type:

sudo apt-get install yersinia

To download yersinia for other distros, go through the Download section of yersinia.


Read more...

Monday 27 August 2012

PhalconPHP - A PHP Framework Available As An Extension

Phalcon framework, a new approach on PHP frameworks. PhalconPHP is an interesting PHP framework delivered as a C extension providing high performance and lower resource consumption.

What is Phalcon


Phalcon is an open source, full stack framework for PHP 5 written as a C-extension, optimized for high performance. You don’t need learn or use the C language, since the functionality is exposed as PHP classes ready for you to use. Phalcon is loosely coupled, allowing you to use its objects as glue components based on the needs of your application.

For compilation, follow the following steps:

# git clone git://github.com/phalcon/cphalcon.git
# cd cphalcon/release
# export CFLAGS="-O2 -fno-delete-null-pointer-checks"
# phpize
# ./configure --enable-phalcon
# make
# sudo make install

Then, add extension to your php.ini

extension=phalcon.so

And finally restart the webserver.

Useful Links

PhalconPHP on GitHub

Interesting review on PhalconPHP

PhalconPHP Documentation

PHP MVC framework benchmark at ruilog.com

PHP MVC framework benchmark at laruence.com


Read more...

Install XAMPP 1.8 From PPA In Ubuntu

Since apache friends has released the v. 1.8 of XAMPP for linux and windows, its important you guys upgrade your XAMPP. In this post, you will find the instructions to install XAMPP 1.8 from PPA.

The most important updates of v. 1.8.0 of XAMPP are: Apache 2.4.2, MySQL 5.5.25a, PHP 5.4.4, and phpMyAdmin 3.5.1. Since the software components are updated, I strongly recommend to upgrade your XAMPP.
All you have to do is follow the following steps in order:

sudo add-apt-repository ppa:upubuntu-com/xampp
sudo apt-get update
sudo apt-get install xampp

Alternatively, you can download the tar file for XAMPP from Apache Friends and follow their instructions to install XAMPP 1.8.0. In case you're looking for upgrading your previous XAMPP installation, be sure to follow this How To.

I hope this helps :)


Read more...

How To Manually Install Flash Player 11 In Linux

This post will provide a step by step instructions for installing flash player 11 plugin in ubuntu 11.04 and other different versions and distros. This will be helpful for everybody who are having trouble with the software center like I had.


Make sure no firefox process is running and then fire up the terminal and type the following commands in order:

mkdir -p ~/flash && cd ~/flash

wget http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.238.orig.tar.gz

tar -zxvf adobe-flashplugin_11.2.202.238.orig.tar.gz

sudo cp -r libflashplayer.so /usr/lib/firefox/plugins

sudo cp -r usr/* /usr

Once you have finished copying the shared object and other necessary files in their respective target directories, you can open the firefox and you're good to go. :)


Read more...

Monday 20 August 2012

Build A Sample Custom Packet [Embedded Systems]

This code snippet was my submission for embedded systems assignment from the embedded system black book by Dr. K.V.K.K. Prasad. It is in no way a real packet and is not meant to represent the IP layer.


Question: Write a C program that takes the filename as input and generates packets of 100 bytes. Develop a simple packet format of your own.

Compilation:

gcc -Wall -lm -o custom_packet custom_packet.c

//custom_packet.c
//      
//eg: ./custom_packet /home/samar/Desktop/cs_rules.txt
//Compilation: gcc -Wall -lm -o custom_packet custom_packet.c
//Custom Packet: Header -> 20 bytes and Data -> 80 bytes
//Find me on http://www.techgaun.com

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

typedef struct
{
        int8_t fragment_offset;
        int8_t ttl;
        int32_t source_ip;
        int32_t dest_ip;
} custom_packet_header;

typedef struct
{
        custom_packet_header header;
        char data[80];
} custom_packet;

long int get_file_size(char fname[])
{
        int fd;
        int count;
        if ((fd = open(fname, O_RDONLY)) == -1)
        {
                perror("Error reading the file\n");
                exit(EXIT_FAILURE);
        }
        
        struct stat buf;
    fstat(fd, &buf);
    count = buf.st_size;
        close(fd);
        return count;
}

int decimalip2numeric(int a, int b, int c, int d)
{
        return (a * 16777216 + b * 65536 + c * 256 + d);
}

/*char * numericip2decimal(int num)
{
        char strs[4];
        strs[0] = (char *) num / 1677;
}*/

int main(int argc, char **argv)
{
        FILE *fp;
        //char fname[256];      //255 bytes is the limit of filename in extN filesystems
        custom_packet * packets;
        long int fsize;
        int num_of_packet, i;
        if (argc != 2)
        {
                printf("Usage: %s filename\n", argv[0]);
                exit(1);
        }
        
        fsize = get_file_size(argv[1]);
        num_of_packet = ceil((double)fsize / 80.0);
        printf("%ld => %d",fsize, num_of_packet);
        
        if ((fp = fopen(argv[1], "rb")) == NULL)
        {
                perror("Error opening the file");
                exit(1);
        }
        
        packets = (custom_packet *) malloc(sizeof(custom_packet) * num_of_packet);
        for (i = 0; i < num_of_packet; i++)
        {               
                packets[i].header.source_ip = decimalip2numeric(127, 0, 0, 1); //storing source ip as 127.0.0.1 for now
                packets[i].header.dest_ip = decimalip2numeric(127, 0, 0, 1); //storing dest ip as 127.0.0.1 for now
                packets[i].header.ttl = 127;
                packets[i].header.fragment_offset = i;
        }
        i = 0;
        while (!feof(fp))
        {
                fread((void *)packets[i].data, 80, 1, fp);
                i++;
        }
        
        fclose(fp);
        
        printf("\n\n----- Printing all the crafted packets -----\n\n");
        for (i = 0; i < num_of_packet; i++)
        {
                printf("[---- Packet Fragment no. %d ----", packets[i].header.fragment_offset);
                printf("\nSource IP -> %d\nDestination IP -> %d\nTime to live -> %d\n", packets[i].header.source_ip, packets[i].header.dest_ip, packets[i].header.ttl);
                printf("Packet data -> %s", packets[i].data);
                printf("\n---- End of Packet no. %d ----]\n\n", packets[i].header.fragment_offset);
        }
        
        return 0;
}



Read more...

Friday 17 August 2012

Bypass Android Pattern Lock In Easy Steps

Android devices has this security feature known as pattern lock which prevents the access of other people in your device. One of the senior members at XDA has revealed a way to bypass this pattern lock feature completely.

There have been several attempts on finding different methods for bypassing pattern unlocking in the android devices. Early methods were tracking the smudges on the screen and guessing since human are more likely to use the patterns they have already seen.

This method, posted in XDA developers forum by m.sabra, requires the USB debugging to be enabled in the android device and then you can use ADB (Android Debug Bridge), a part of Android SDK to easily bypass the pattern unlock with few lines of commands. The user has revealed two methods for bypassing this, the first one involves running few SQLite queries and the second one requires deleting the associated key.

You will need to download the Android SDK in order to continue with this hack.

Method 1:

adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit

AND/OR

Method 2:

adb shell rm /data/system/gesture.key

You can either choose one of the methods or perform both of the methods (method 1 first and method 2 second). Be sure to reboot once you perform any of the above mentioned methods.



Users have said that this method is not working on the latest Android Jelly Bean and other custom ROMs such as Cyanogen Mod. But, earlier android versions are vulnerable to this hack.

Even if the USB debugging is disabled, you can still run these methods if custom recovery was installed in the android device. You will have to mount the working partition. Just go to 'Mounts and Storage' and mount /data. Then you can follow the above methods to bypass the lock.


Read more...

Monday 13 August 2012

Screen Recording Software Solutions For Linux

Windows users have several options to choose from when it comes to the desktop recording (and only paid ones are good generally) but Linux users have fewer options but robust, simple, and best of all, free and open source desktop screen recording tools that we can trust on.

Below are some of the screen recording tools you might want to try:

recordMyDesktop


recordMyDesktop is a desktop session recorder for GNU/Linux written in C. recordMyDesktop itself is a command-line tool and few GUI frontends are also available for this tool. There are two frontends, written in python with pyGtk (gtk-recordMyDesktop) and pyQt4 (qt-recordMyDesktop). recordMyDesktop offers also the ability to record audio through ALSA, OSS or the JACK audio server. Also, recordMyDesktop produces files using only open formats. These are theora for video and vorbis for audio, using the ogg container.

Installation under debian and ubuntu:

sudo apt-get install gtk-recordmydesktop

XVidCap


XVidCap is a small tool to capture things going on on an X-Windows display to either individual frames or an MPEG video. It enables you to capture videos off your X-Window desktop for illustration or documentation purposes.It is intended to be a standards-based alternative to tools like Lotus ScreenCam.

sudo apt-get install xvidcap

Istanbul


Istanbul is a desktop session recorder for the Free Desktop. It records your session into an Ogg Theora video file. To start the recording, you click on its icon in the notification area. To stop you click its icon again. It works on GNOME, KDE, XFCE and others. It was named so as a tribute to Liverpool's 5th European Cup triumph in Istanbul on May 25th 2005.

sudo apt-get install istanbul

Vnc2Flv


Vnc2flv is a cross-platform screen recording tool for UNIX, Windows or Mac. It captures a VNC desktop session (either your own screen or a remote computer) and saves as a Flash Video (FLV) file.

Wink


Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and generate a highly effective tutorial for your users. It requires GTK 2.4 or higher and unfortunately is just a freeware(could not find any source code for it).

Screenkast


Screenkast is a screen capturing program that records your screen-activities, supports commentboxes and exports to all video formats.

If you got any more suggestions, please drop the comment. :)


Read more...