Ethical Hacking and Information Security Workshop

Hosted by the IEEE Student Branch of MIT(Feb. 29 2012 and Mar. 1 2012

Virscent Technologies Pvt. Ltd. in association with IIT-Kharagpur E-Cell is proud to present D_Code – the Ethical Hacking Workshop. The course focuses on giving hands on training to all the participants in the field of Ethical Hacking.
The modules of the workshop are:

  1. Introduction to Ethical Hacking
  2. Cyber Forensics
  3. Web Based Email Attacks & Security
  4. Windows OS Hacks
  5. Understanding Malware Working & Detection
  6. Networking Attacks & Security
  7. Wi-Fi Attacks & Security
  8. Web Server Attacks & Security
  9. Hacking Using Google
  10. Software Reverse Engineering
  11. VOIP & Mobile Hacking

IEEE Software issue on ‘Algorithms for Today’s Practitioner’

I am reading the Jan/Feb 2012 issue of IEEE Software that should strike a chord with Software engineers in the offshore industry. Even financial application developers are oblivious to the need for algorithms that are not always part of the J2SE kit or an astronomically priced tool that the management here favors.

The awareness is lacking and the motivation to read about and experiment with code and algorithms is missing.

I also read the interesting interview with David Chaiken, Chief Architect of Yahoo who visited the Chennai IIT and spoke about his work in Yahoo. I was in the audience and remember that he pointed out a particular bug ID that caused some Yahoo servers in the production data centre to mishebave after he deployed a release.

My question to him was about the testing procedures that Yahoo uses for such large-scale deployments and I was looking for some tips about testing distributed applications. He just replied that Yahoo tries to use agile testing principles in some cases.

I have to rememeber to urge the local IEEE chapter to invite such speakers more frequently and also involve the developer community. There were faculty and students on that day amongst the sparse audience.

Apache ZooKeeper

I don’t know why management of firms that deal with financial data tend to be very conservative about new technology in my part of the world. There are varied reasons for this but the lack of experience of executives is high on the list. The vision to support large-scale deployments of mission critical software is just not there.

Company honchos should read Joel Spolsky’s opinion about the role of the executives in shaping the technology roadmap of the company.

I recently explored options to monitor and operate a simple cluster of Java socket programs and came across ZooKeeper. It is not strictly a requirement for a distributed application but these individual socket programs need to be managed and some may need to be restarted.

Initially I thought of using Google protobuffer and send simple information about the number of messages and load to the centralized ZooKeeper instance so that some decision can be taken based on it. This idea is not fully explored yet but the sample program that uses ZooKeeper nodes and proto buffer messages is shown below.

The messages sent and received from ZooKeeper nodes can be serialized in any way and here proto buffer is used for that.

Producer stores messages in the node


import com.google.protobuf.InvalidProtocolBufferException;
import message.Message;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;

import java.io.IOException;

public class DistributedProducer {

    private ZooKeeperCoordinator zkc;

    private String root = "/Protocol Buffer";

    {
        try {
            zkc =
            new ZooKeeperCoordinator( "localhost:2181",
                                      root );
            zkc.connect();
            zkc.setUpRoot();
        } catch (InterruptedException e) {

            System.out.println( "InterruptedException" );

        } catch (IOException e) {

            System.out.println( "IOException" );
        }

    }

    public void send() throws IOException, InterruptedException, KeeperException {

        if( null != zkc ){
            ZooKeeper zk = zkc.getZookeeper();
            Stat stat =
            zk.setData( root + "/protocolbuffer",
                       getData(),
                       -1
                      );
            System.out.println( "Stat is  [" + stat + "]");
        }
    }

    private byte[] getData() throws InvalidProtocolBufferException {
        Message.Load message = Message.Load.newBuilder().setType(
                                 ( Message.Load.LoadType.HIGH)).build();
        Message.Load message1 = Message.Load.parseFrom( message.toByteArray() );
        System.out.println( "Distributed value is [" + message1.getType().toString() +"]");
        return message.toByteArray();
    }
}

Consumer consumes it.


import com.google.protobuf.InvalidProtocolBufferException;
import message.Message;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;

public class DistributedConsumer {

    private ZooKeeperCoordinator zkc;

    private String root = "/Protocol Buffer";

    {
        try {
            zkc =
            new ZooKeeperCoordinator( "localhost:2181",
                                      root );
            zkc.connect();
        } catch (InterruptedException e) {

            System.out.println( "InterruptedException" );

        } catch (IOException e) {

            System.out.println( "IOException" );
        }

    }

    public void receive() throws IOException, InterruptedException, KeeperException {

        Stat stat = null;

            if( null != zkc ){
                ZooKeeper zk = zkc.getZookeeper();
                if( null != zk ){
                    byte[] value =
                    zk.getData( root + "/protocolbuffer",
                               false,
                               stat
                              );
                    getData( value );
                }
            }
    }

    private void getData( byte[] value ){

        try {
            Message.Load message = Message.Load.parseFrom( value );
            System.out.println( "Distributed value is  [" + message.getType().toString() + "]");

        } catch (InvalidProtocolBufferException e) {

            System.out.println( "InvalidProtocolBufferException" + e.getMessage() );
            e.printStackTrace();

        }
    }
}

A client that connects to and sets up ZooKeeper


import org.apache.zookeeper.*;
import org.apache.zookeeper.data.Stat;

import java.io.IOException;
import java.util.concurrent.CountDownLatch;

public class ZooKeeperCoordinator {
    
    private String host;
    
    private String root;

    private Stat stat;

    public ZooKeeper getZookeeper() {
        return zookeeper;
    }

    private ZooKeeper zookeeper;

    public ZooKeeperCoordinator( String host,
                                 String root ){

        this.host = host;
        this.root = root;

    }

    public void setUpRoot(){

        System.out.println( "Set up root" );
        try {
            stat = zookeeper.exists( root,
                                     false );
            if( null == stat ){
                 zookeeper.create( root,
                                   new byte[ 0 ],
                                   ZooDefs.Ids.OPEN_ACL_UNSAFE,
                                   CreateMode.PERSISTENT);
            }
        } catch (KeeperException e) {
            System.out.println( "KeeperException" );

        } catch (InterruptedException e) {
            System.out.println( "InterruptedException" );
        }
    }

    public void connect() throws InterruptedException, IOException {

        System.out.println( "connect" );
        final CountDownLatch latch = new CountDownLatch( 1 );

        Watcher watcher = new Watcher(){

            public void process(WatchedEvent watchedEvent) {

                if( watchedEvent.getState() == Event.KeeperState.SyncConnected ){
                    latch.countDown();
                }
            }
        };

        zookeeper = new ZooKeeper( host, 1000, watcher );
        latch.await();
        System.out.println( "Awaiting connection" );
    }

    public void close() throws InterruptedException {
        zookeeper.close();
    }
}

The Protocol Buffers documentation has instructions to compile this simple .proto data structure

package message;

message Load {

  enum LoadType {
    HIGH = 0;
    MEDIUM = 1;
    LOW = 2;
  }


  optional LoadType type = 1 [default = MEDIUM];

}

Mac OS Lion freezes too

I realized that the Mac OS freezes too and not for a serious reason. I just tried to install firefox and Finder caused my Laptop to become unusable.

So following the advice in this site I cleaned its preferences but there was no respite.

As a last resort I booted in single user mode and issued rm /var/db/.applesetupdone. I created a new admin. user and deleted my old administrators.

That wasted my Sunday. This has never happened to my Ubuntu desktops.

Sebastian Thrun’s democratic university

I am stumped. Stanford research professor Sebastian Thrun and other professors are planning to organize and teach an entire university course in Computer Science !! I planned to but didn’t take their initial AI course but this is too good to miss. They are following it up with an entire degree course in CS. What attracts me is the open courseware concept and the self-driving car.

As a software developer I have firsthand knowledge of the lack of taste for algorithms/CS and how the entire offshore industry is stuck in a medieval mindset.
I am much obliged.

However you look at this endeavor this proves that if one is set on thinking audaciously action will follow. Shouldn’t this stir up our interest in CS and its application to seemingly mundane software engineering?

Description: This class, taught by one of the foremost experts in AI, will teach you basic methods in Artificial Intelligence, including: probabilistic inference, computer vision, machine learning, and planning, all with a focus on robotics. Extensive programming examples and assignments will apply these methods in the context of building self-driving cars. You will get a chance to visit, via video, the leading research labs in the field, and meet the scientists and engineers who are building self-driving cars at Stanford and Google.
Prerequisites: The instructor will assume solid knowledge of programming, all programming will be in Python. Knowledge of probability and linear algebra will be helpful.