Professional Activities

Simulation & Modelling

Simulation and Modelling are approaches at describing a small-scale representation of something that serves as a guide in constructing the full-scale version. They are often used in evaluating new thoughts, or investigating new research, especially, in sciences and engineering.There are useful tools for someone working on simulation and modeling. Many open source software to explore exist, while very expensive simulation and modelling application also exist. I’ve used Ptolemy II and currently working on applications using NS-2. I’ve used Mathematica and MatLAB. I’m aware of  OpNet, but I didn’t use it during my research days, as a PhD student. Opnet is large-scale, but commercial performance and operations software. I think, student versions exist for student researchers.

Ptolemy is a Java-based component simulator that comprises of wireless and wired simulator modules.

“The Ptolemy project studies modeling, simulation, and design of concurrent, real-time, embedded systems. The focus is on assembly of concurrent components. The key underlying principle in the project is the use of well-defined models of computation that govern the interactions between components. A major problem area being addressed is the use of heterogeneous mixtures of models of computation” – Prof. Edward A. Lee @UCB

Fancy using discrete event simulator, then explore working with NS-2. Network Simulator (NS-2) provides substantial support for simulation of TCP, Routing, and Multicast protocols over wired and wireless (local and satellite) networks.

Most simulators or (modelling applications) require a bit of mathematics, and I particularly find it useful knowing the underlining concepts rather than just using the tool without much details on how and what it does. So if you need to know more about the mathematical underpinnings to simulators or modelling have a good read of some of these documents.

This is a useful tool for modelling, comprising of variety of models, from Graph Isomorphism to Combinatorics. I have used Mathematica on different occasion, and can’t imagine if it was easier to use than MatLAB.

MatLAB is a scientific simulation software by MathWorks. It is exceptional good for physical models, aerospace and vibrators. And useful for engineering modelling and emulations.

Opnet is an industrial and commercial software for modelling engineering applications for performance, operation and scale.

PhD Docs

  • How to write PhD Thesis
    Excellent guide to writing PhD research thesis. It covers tips on how to handle the daunting time of thesis defence. I personally recommend it for a read for any PhD student.
  • The Researcher’s Bible
    A rich material covering every step of writing a PhD thesis up to viva. The Researchers’ Bible (How to survive a PhD) by Alan Bundy, Ben du Boulay, is an excellent PhD companion in my opinion.
  • How to survive a PhD thesis Viva
    How to survive a PhD defence by
    Prof. Joe Wolfe contains important advice on how to answer and respond to your defence supervisor during the viva (interview) time.
  • Researcher’s Guide to Technical Writing
    – Tips to technical writing

TCL Programming

TCL stands for Tool Command Language. Tcl is both a scripting language, and an interpreter, which can be easily embeded into an application. Tcl and its associated graphical user interface toolkit, Tk, were designed and crafted by Professor John Ousterhout of the University of California, Berkeley. You can find these packages on the Internet (as explained later) and use them freely in your application, even if it is commercial. The Tcl interpreter has been ported from UNIX to DOS, Windows, OS/2, NT, and Macintosh environments. The Tk toolkit has been ported from the X window system to Windows and Macintosh.

  • TCL Online Tutorials
    Easy to read and understand tutorial for quick TCL commands in a glance.
  • Advanced TCL Resources
    A good mix of materials for advanced TCL tutorial and programming.
  • Expect & TCL Programming
    Expect is an interactive TCL interpreter for interacting with other applications, such as ftp, telnet, ssh, passwd, fsck, rlogin etc. Expect really makes certain tuff very trivial. To download Expect for Unix or Expect for Windows.
  • Source:
    The home page for this book contains errata for all editions:

TCL and Databases

To use TCL to connect to databases (Oracle, MYSQL, ACCESS etc) you require an API/library that enables the connection. Therefore, a connection to MYSQL database using TCL script requires a library which enables TCL to connect to MYSQL database. This is similar to ODBC library that enable database connectivity to Java or C. MYSQLTCL is a library (simple API) that enables database connectivity using TCL script to mysql databases. In this ‘howto’ tutorial, I will explain the necessary steps to get MYSQLTCL working on a Fedora Core 3 personal computer version with TCL installed.

  • Download
    To download mysqltcl library, please refer to your operating system to determine which code to download. Widely available mysqltcl API are Unix, Linux, windows or MAC distributions. Please, also verify which mysqltcl version you wish to run on your system. Note: This ‘howto’ is specific for installing mysqltcl2.04 on Linux 2.6.9-1.667smp #1, for a personal computer use. To have mysqltcl working fine, you need to have installed
    MYSQL and TCL on your system. Although, this tutorial is for mysqltcl2.04, all the steps are same for installing other versions of mysqltcl including the most recent version – mysqltcl3.0.
  • Installation
    1) Install mysql devel library from the fedora CD #3. On the mysql directory, you must have a
    mysql.h file.

    2) Check the path to your systems tcl.h file (check for the library and include directories)

    3) To unzip and untar the mysqltcl downloaded, type

    4) tar -zxvf ./mysqltcl-xxxxxx.tar.gz

    5) cd ./mysqltcl-xxxxx

    6) ./configure –with-tcl=/usr/local/activetcl/lib/tcl8.4 –with-tclinclude=/usr/local/activetcl/include/tcl8.4 –with-mysql-include=/usr/include/mysql –with-mysql-lib=/usr/lib/mysql

    7) make

    8) make install

    9) Please check for the file in the directory where you installed the library.

    Note: You need to load the file before you can use the mysqltcl library (for example: to use your mysqltcl API do the following:

    a) type tclsh, then,
    b) type load ./, (where x.xx is the version corresponding to the version you have installed)
    c) type package require mysqlltcl
    d) type package require Tclx

    I recommend you copy the file to the directory where you have TCL installed (for example /usr/local/activetcl or /usr/bin/tcl8.4 etc). Please check you default TCL directory with this command: Type: which tcl (enter). But for my case, I installed activetcl, so my directory was /usr/local/activetcl/bin

  • Commands
    #1: which tcl (to display the path to your tcl)
    #2: tclsh
    #3: load
    #4: package require Tclx
    #5: package require mysqltcl


    package require Tclx
    package require mysqltcl
    global mysqlstatus

    set port {3306}
    set host {localhost}

    puts -nonewline “username:”; gets stdin username

    if {$username == “exit”} {
    puts “This program will be exiting now!!!”
    } else {
    set user $username

    puts -nonewline “password:”; gets stdin pass

    puts “database {snort, ossim ossim_acl}:”
    gets stdin database

    #handler for database connection
    set handler [mysqlconnect -host $host -port $port -user $username -password $pass -db $database]

    #host = host to connect (localhopst or ipaddress)
    #port = port to connect to mysql (unique port is 3306, except where different)
    #user = username to login to mysql database
    #pass = corresponding password to username
    #db = database in mysql, example, test, snort etc

    #this statement catches mysql connection error, such as invalid username/password pair, database not specified etc.

    if [catch {mysqlconnect -host $host -port $port -user $username -password $pass -db $database} handler] {
    puts stderr $mysqlststus(message)
    } else {
    set sig_list [mysqlsel $handler {select sig_id, sig_name from signature} -list]

    foreach {id type} $sig_list {
    puts “$id $type”

    mysqlclose $handler

    mysqlconnect (makes a database connection to mysql). the parameters are -port, -host, -user, -password, -db:

    port: is the default mysql port 3306 (unless otherwise its changed during the setup)
    host: is the system running the database, use localhost or the ip address of the system
    user: the username to use for authentication to the database
    password: the password pair to the username
    db: the database created in mysql

    mysqlsel: is a mysql select command for the API.
    1: mysqlsel $handler {select * from column} or
    2: mysqlsel $handler {select * from column} -list/flatlist. Where -list creates a list of each item from the handler, while -flatlist creates just a list of the result from the handler. I strongly recommend using -flastlist unless you wish to have each element of the list as list items.

    Note: Most normal sql select or query statement are permissible with mysqlsel. For example: mysqlsel $handler {select sid, signature, name, sensor from events where timestamp=”2006-14-05 00:00:00″};
    mysqlsel $handler “select sid, signature, name from events where signature = 10”;

  • References
    MYSQL Database:Download
    TCL: Download

Notable Journals in Security

  • IEEE Transactions on Dependable and Secure Computing
  • International Journal on Cyber Situational Awareness (IJSCA)
  • IEEE Security & Privacy Magazine
  • Computer & Security
  • IEEE Transactions on Information Forensics and Security
  • ACM Transactions on Information and System Security
  • International Journal of Security
  • International Journal of Network Security
  • Journal of Information Security
  • International Journal of Computer Science and Network Security