Saturday, December 11, 2010

Saturday, November 27, 2010

Ranjan's Photography...

This diwali i thought of a little gift for myself ..a nice DSLR camera whcih will help me to improve my creativity and photography skills and fortunately i found a "Canon EOS 1000D / Rebel XS "in a shop near my home and without any second thought i bought it.
Photography is wonderful and is my new found hobby. This a small collection of various photos I have ...hope you guys will like it ..:)























Sunday, October 31, 2010

ಕನ್ನಡ ರಾಜ್ಯೋತ್ಸವದ ಹಾರ್ದಿಕ ಶುಭಾಶಯಗಳು !!.

ಎಲ್ಲಾದರು ಇರು ಎಂತಾದರು ಇರು ||೨||

ಎಂದೆಂದಿಗೂ ನೀ ಕನ್ನಡವಾಗಿರು
ಕನ್ನಡವೇ ಸತ್ಯ, ಕನ್ನಡವೇ ನಿತ್ಯ

ಕನ್ನಡ ಗೋವಿನ ಓ ಮುದ್ದಿನ ಕರು ||೨||
ಕನ್ನಡತನ ಒಂದಿದ್ದರೆ, ಅಮ್ಮಗೆ ಕಲ್ಪತರು
ಕನ್ನಡವೇ ಸತ್ಯ, ಕನ್ನಡವೇ ನಿತ್ಯ
ಎಲ್ಲಾದರು ಇರು ಎಂತಾದರು ಇರು
ಎಂದೆಂದಿಗೂ ನೀ ಕನ್ನಡವಾಗಿರು

ನೀ ಮೆಟ್ಟುವ ನೆಲ, ಅದೆ ಕರ್ನಾಟಕ
ನೀನೇರುವ ಮಲೆ ಸಹ್ಯಾದ್ರಿ
ನೀ ಮೆಟ್ಟುವ ನೆಲ, ಅದೆ ಕರ್ನಾಟಕ
ನೀನೇರುವ ಮಲೆ ಸಹ್ಯಾದ್ರಿ

ನೀ ಮುಟ್ಟುವ ಮರ ಶ್ರೀಗಂಧದ ಮರ ||೨||
ನೀ ಕುಡಿಯುವ ನೀರ್ ಕಾವೇರಿ

ಪಂಪನ ಓದುವ ನಿನ್ನಾ ನಾಲೆಗೆ
ಕನ್ನಡವೇ ಸತ್ಯ
ಕುಮಾರವ್ಯಾಸನ ಆಲಿಪ ಕಿವಿಯದು
ಕನ್ನಡವೇ ನಿತ್ಯ

ಎಲ್ಲಾದರು ಇರು ಎಂತಾದರು ಇರು
ಎಂದೆಂದಿಗೂ ನೀ ಕನ್ನಡವಾಗಿರು

ಹರಿಹರ ರಾಘವರಿಗೆ ಎರಗುವ ಮನ
ಹಾಳಾಗಿಹ ಹಂಪೆಗೆ ಕೊರಗುವ ಮನ
ಹರಿಹರ ರಾಘವರಿಗೆ ಎರಗುವ ಮನ
ಹಾಳಾಗಿಹ ಹಂಪೆಗೆ ಕೊರಗುವ ಮನ

ಬೆಳ್ಗೊಳ ಬೇಲೂರ್‍ಗಳ ನೆನೆಯುವ ಮನ

ಮಲೆನಾಡಿಗೆ ಹೊಂಪುಳಿ ಹೋಗುವ ಮನ
ಕಾಜಾಣಕೆ ಗಿಳಿ, ಕೋಗಿಲೆ ಇಂಪಿಗೆ
ಮಲ್ಲಿಗೆ ಸಂಪಿಗೆ ಕೇದಗೆ ಸೊಂಪಿಗೆ
ಕಾಜಾಣಕೆ ಗಿಳಿ, ಕೋಗಿಲೆ ಇಂಪಿಗೆ
ಮಲ್ಲಿಗೆ ಸಂಪಿಗೆ ಕೇದಗೆ ಸೊಂಪಿಗೆ

ಮಾವಿನ ಹೊಂಗೆಯ ತಳಿರಿನ ತಂಪಿಗೆ

ರೋಮಾಂಚನಗೊಳ್ಳುವ ಮನ
ಕನ್ನಡವೇ ಸತ್ಯ, ಕನ್ನಡವೇ ನಿತ್ಯ
ಎಲ್ಲಾದರು ಇರು ಎಂತಾದರು ಇರು
ಎಂದೆಂದಿಗು ನೀ ಕನ್ನಡವಾಗಿರು

ಎಲ್ಲಿದ್ದರೆ ಏನ್ ಎಂತಿದ್ದರೆ ಏನ್
ಎಲ್ಲಿದ್ದರೆ ಏನ್ ಎಂತಿದ್ದರೆ ಏನ್

ಎಂದೆಂದಿಗು ತಾನ್ ಕನ್ನಡವೇ ಸತ್ಯ ಕನ್ನಡವೇ ನಿತ್ಯ
ಅನ್ಯವೆನಲದೆ ಮಿಥ್ಯ


Wednesday, October 20, 2010

ALG - Application Level Gateway

An Application Layer Gateway (ALG) is a software component that is designed to manage specific protocols such as Session Initiation Protocol (SIP) or File Transfer Protocol (FTP)
The ALG intercepts and analyzes the specified traffic, allocates resources, and defines dynamic policies to permit the traffic to pass securely through the ALG.



Application level Gateway, as the name suggests, operates in the Application layer of the OSI model and actively inspects the contents of packets that are passed through to the gateway. Let's go ahead into the details of its functioning to understand this technology better.

The Application Level Gateway acts as a proxy for applications, performing all data exchanges with the remote system in their behalf. This can render a computer behind the firewall all but invisible to the remote system.

It can allow or disallow traffic according to very specific rules, for instance permitting some commands to a server but not others, limiting file access to certain types, varying rules according to authenticated users and so forth. This type of firewall may also perform very detailed logging of traffic and monitoring of events on the host system, and can often be instructed to sound alarms or notify an operator under defined conditions.

Application-level gateways are generally regarded as the most secure type of firewall. They certainly have the most sophisticated capabilities.

A disadvantage is that setup may be very complex, requiring detailed attention to the individual applications that use the gateway.


An application-level gateway acts as a intermediate system between the Internet and the application server that understands the relevant application protocol. This application-level gateway's system appears to the outside world as the end point application server, but in reality, the gateway interprets each incoming request, reduces the request to the application server's own internal lexicon, then builds a new request from scratch discards and prevents any malicious, malformed content from getting through. The gateway then sends a new request to the actual application server and processes the servers reply in the same fashion.


An application-level gateway intercepts the incoming and outgoing packets, runs a proxy to copy and forward information across the gateway, and functions as a proxy server, thereby preventing any direct connection between a trusted server or client and an untrusted host.

Functions of an ALG can be defined as:

  • Allow client applications to use dynamic TCP/ UDP ports to communicate with the known ports used by the server applications, even though a firewall configuration may allow only a limited number of known ports. In the absence of an ALG, either the ports would get blocked or the network administrator would need to explicitly open up a large number of ports in the firewall - rendering the network vulnerable to attacks on those ports.
  • Convert the network layer address information found inside an application payload between the addresses acceptable by the hosts on either side of the firewall/NAT.
  • Recognize application-specific commands and offering granular security controls over them
  • Synchronize between multiple streams/sessions of data between two hosts exchanging data.
  • Deep packet-inspection of all the packets over a given network

  • Two types of Proxies used by application-level gateways are:
  • Application-specific Proxies

  • Application-level Filtering

    Application-specific Proxies. Application-specific proxies accept only packets that are generated by services they are designed to copy, forward, and filter. There is a drawback here that is if a network relies only on an application-level gateway, incoming and outgoing packets cannot access services for which there is not a proxy. For example, if an application-level gateway runs a Telnet proxy, only packets generated by this service could pass through the firewall. All other services would be blocked.

    Application-level Filtering. An application-level gateway runs proxies that examines and filters individual packets. This is achieved by checking each packet that passes through the gateway, verifying the contents of the packet up through the application layer of the OSI model. These proxies can filter particular kinds of commands or information in the application protocols the proxies are designed to copy, forward, and filter.
  • Saturday, July 24, 2010

    TCP Explained.

    Always on Time !!..The Transmission control protocol (TCP) Provides applications with reliable ,connection-oriented service and provides full logical path between two hosts on disparate networks .

    This article is an attempt to detail the different fields available in the TCP segment .

    Source and Destination port :Its a 16 bit field that specifie
    s the source and destination applications for the encapsulated data.


    RFC 1700 describes all the ports number in common and not so-common use (http://www.ietf.org/rfc/rfc1700.txt).

    A port number for an application ,which is combined with an ip address of the applications where host resides in , is called a socket .
    Sequence number : Its a 32 bit identifier which identifies where the encapsulated data is fits within a data stream .
    If the sequence number of a segment is 1 and the segments contains 512 octets ..the next segment should have sequence number of 1+512=513.
    Acknowledgment number :Its a 32 bit field which tells what would be the sequence number the source expects to receive from destination.
    If a hosts receives a acknowledgment number that doesn't match the next sequence number it intends to send , it concludes that packets earlier sent has not reach the destination and it will re-transmits the same.

    Header Length :Its a data offset and a four bit field indicates the length of the header in 32-bit words and indicates the beginning of the data.

    Reserved Field :Its of six bites ..which are always set to zero.

    Flags :They are six 1-bit flags that used for data flow and control .
    URG -Urgent
    ACK-Acknowledgment
    PSH-Push
    RST-Reset
    SYN-Synchronize
    FIN-Final

    Window Size: 16 bit field used for flow control .It specifies the number of octets,starting with the octet in indicated by acknowledgment number, that the sender of the segment will accept from its peer.
    It specifies how much data it can handle or process at a time .


    Checksum: Its a 16 bit field covering both the header and the encapsulated data,allowing error detection.
    Urgent pointer :Its again a 16 bit field ..its used only when the URG Flag is set..urgent pointer added to the sequence number indicating the end of the urgent data.

    Options :Optional field .One good example is maximum segment size ..which indicates what will be the maximum segment size sender is willing to accept .

    The remainder of the field is padded with zeroes to ensure that the header length is multiple of 32 octets .

    Here below is an example of TCP packet capture details using Wireshark

    Friday, July 23, 2010

    A sneak peak in to the IP Packet.


    Though Most of us know about the IP packet..here is an attempt to explain the IP packet detailing each and every field it has.

    Ok..now let's sneak in to a IP packet ..



    Version
    :Version identifies which version of the IP (Either IPv4 or IPV6) This packet belongs to.And this is a four bit field usually set to binary 0100.


    Header Length:Header length is also a 4 bit field in an IP Packet and as the name implies its tells about the length of the IP header.
    The minimum length of a IP header is 20 octets and can scale up to 24 octets.
    TOS (Type of Service):Its a 8 bit field which can be broken down in to two parts .a)precedence :Which talks about the priority Very urgent,urgent or normal delivery of the packet and b)TOS :and this deciding on the priority of delivery will be based on throughput,delay,reliability and monetary cost factors.

    And yep!!.this precedence will be used in QoS (Quality of Service) applications.

    Total Length: It talks about the total length of the IP Packet including the header in octets ranging from 16 to 65,535 octets . This field consist of 16 bit.

    Identifier:Imagine you are sending a 5000 byte packets in the network and it encounters a data link whose MTU is set 1500 bytes and that means that link can handle only 1500 bytes at a time. in that case the entire packet will be fragmented in to the chuncks of not more than 1500 bytes and then router marks each fragment with the same number in the identifier field so that a receiving device can identify the fragments and that go together in the end . This field consists of 16 bits .

    Flags: Its a three bit field ..where first bit will be unused . second one is don't fragment(DF) bit .When this bit is set to on (1), the device which handling the packet cann't fragment the incoming packet .

    If the incoming packet is of size which is larger than it can handle and if its not allowed to fragment than it will drop the packet and sends an error message to the source of the packet and this DF option will be set to determine the MTU on a network .

    The third bit is MF(More fragments) bit..when a device fragments a packet , it sets MF bit to one and on the last packet where there is no more packets need to be fragmented it will set the MF bit to zero .

    Fragment Offset :Its specifies offsets and responsible for fragments packets to re-assembled in the correct order in the end .

    TTL(Time To Leave):You know it ..when a packet starts it journey towards its destination in a network ...as it passes through each hops (routers) the initially set value of TTL is decremented by one so that it prevents lost packets from wandering endlessly through an inter network and when the TTL value reaches zero packet will be discarded and the error message will be sent to the source.

    Protocol:It talks about which transport layer protocol like this packet is destined for .( Example :1 is for ICMP.6 for TCP and 17 for UDP).

    Header checksum :Its used for error-correction and its not used for encapsulated data.Its a 16 bit field field where the checksum will calculated at the source and once its received at the destination the checksum will be again calculated and if the checksums are exactly matching ( all one's) than it proves that packet is recieved without any errors and received intact .

    Source and Destination Address: We all know abt this ! ..its 32 bit IP address . Identifies the source and destination.

    Options : Its Optional!!..only used when it need contains any source generated information or for other routers to enter information like timestamp and strict source routing where its strictly defined how the packets should be routed via which routers interfaces .

    Padding ensures that header ends on a 32 bit boundaryby adding extra zeroes after the option field until a multiple of 32 is reached .

    Wireshark capture of an IP packet as below;







    Sunday, July 4, 2010

    A Tour inside IPSec Tunnel..

    Internet Protocol security (IPsec) is a suite of protocols for securing network connections or a framework of open standards for protecting communications over Internet Protocol (IP) networks through the use of cryptographic security services. IPsec supports network-level peer authentication, data origin authentication, data integrity, data confidentiality (encryption), and replay protection.

    IPsec provides mechanism, not policy: rather than define such-and-such encryption algorithm or a certain authentication function, it provides a framework that allows an implementation to provide nearly anything that both ends agree upon…I mean anything!! J

    Terms used in IPSec

    AH versus ESP

    Authentication Header (AH) "Encapsulating Security Payload" (ESP) are the two main wire-level protocols used by IPsec. Where Authentication Header (AH) only authenticates ..ESP does both the encryption and authentication. Though, they independently used one from another ..Though,we can combine it and use it.

    Tunnel mode versus Transport mode

    Transport mode only encapsulates IP packets payload (data) ..where, the tunnel mode encapsulates entire IP packet and creates a secure end tunnel between two peers across the untrusted public Network (Internet).

    MD5/SHA1 and DES/3DES/AES…

    Setting up an IPsec connection involves all kinds of crypto choices ;

    Authentication :

    Authentication is performs Integrity Check Value (ICV) on the packets needs to be sent based on cryptographic hash algorithm such as MD5 or SHA. It incorporates a secret key only known for both the ends. ..and once packet will reach the destination ICV will be calculated and if the ICV of the sender is same as the recipient that means it successfully authenticated .

    AH always provides authentication, and ESP does so optionally.

    Encryption:

    Encryption is to Modify the packet data in something unreadable format based on algorithms like DES,3DES or AES and which reversible to original format by decrypting these algorithms .

    Main mode versus aggressive mode:

    "Main mode" requires six packets back and forth, but affords complete security during the establishment of an IPsec connection, while Aggressive mode uses only 3 exchanges providing a bit less security because some information is transmitted in clear text. We will talk it in detail about this …

    Main mode is preferred because:

    · Main mode is partially encrypted, from the point at which the shared DH key is known to both peers.

    · Main mode is less susceptible to Denial of Service (DoS) attacks. In main mode, the DH computation is performed after authentication. In aggressive mode, the DH computation is performed parallel to authentication. A peer that is not yet authenticated can force processor intensive Diffie-Hellman computations on the other peer.

    In symmetric cryptographic systems, both communicating parties use the same key for encryption and decryption. The material used to build these keys must be exchanged in a secure fashion. Information can be securely exchanged only if the key belongs exclusively to the communicating parties.

    IKE

    The goal of the Internet Key Exchange (IKE) is for both sides to independently produce the same symmetrical key. This key then encrypts and decrypts the regular IP packets used in the bulk transfer of data between VPN peers. IKE builds the VPN tunnel by authenticating both sides and reaching an agreement on methods of encryption and integrity. The outcome of an IKE negotiation is a Security Association (SA) .

    Need to be noted that this agreement upon keys and methods of encryption must also be performed securely. For this reason IKE is composed of two phases. The first phase lays the foundations for the second.

    Diffie-Hellman (DH) is that part of the IKE protocol used for exchanging the material from which the symmetrical keys are built. The Diffie-Hellman algorithm builds an encryption key known as a "shared secret" from the private key of one party and the public key of the other.

    IKE Phase I

    During IKE Phase I:

    1.The peers authenticate, either by certificates or via a pre-shared secret.

    2.A Diffie-Hellman key is Generated. The nature of the Diffie-Hellman protocol means that both sides can independently create the shared secret, a key which is known only to the peers.

    It happens something like this ;

    a)From a pool of random bits , each side produces DH private key .

    b)Each peer derives a public key from its private key .

    c)Public keys are exchanged between these two sites .

    d)Each side creates a shared secret from their own private key and the public key received from the peer ( we call it as shared key or DH key.

    This DH key is used to exchange

    3. Key material (random bits and other mathematical data) as well as an agreement on methods for IKE phase II are exchanged between the peers. It lays the foundation for the IKE Phase 2 (Quick mode/IPSec mode)

    IKE Phase 2 :

    IKE phase II is encrypted according to the keys and methods agreed upon in IKE phase I. The key material exchanged during IKE phase II is used for building the IPSec keys.

    The outcome of phase II is the IPSec Security Association. The IPSec SA is an agreement on keys and methods for IPSec, thus IPSec takes place according to the keys and methods agreed upon in IKE phase II.

    How things work in IKE Phase 2 :

    a)Peer exchange more key material and agree upon encryption (AES.DES.3DES) and Integrity (MD5,SHA1) methods for IPsec.

    b) DH keys created in Phase 1 will be combined with the key materials to produce Symmetrical IPSec key .

    c)Symmetric IPsec keys used in Bulk data transfer.

    In summary :

    1.IKE negotiations builds the tunnel .

    2.Ipsec keys used to create encrypted IP Packets for transferring the data.

    3.Data payload is encrypted using the various encryption mechanism like DES,AES..

    4.Data integrity is ensured with one-way hash functions like MD5,SHA1.

    5.Data transfer over the tunnel.

    Perfect Forward Secrecy (PFS)

    Perfect Forward Secrecy (PFS) refers to the condition in which the compromise of a current session key or long-term private key does not cause the compromise of earlier or subsequent keys. Security gateways meet this requirement with a PFS mode. When PFS is enabled, a fresh DH key is generated during IKE phase II, and renewed for each key exchange.

    However, because a new DH key is generated during each IKE phase I, no dependency exists between these keys and those produced in subsequent IKE Phase I negotiations. Enable PFS in IKE phase II only in situations where extreme security is required.

    Saturday, July 3, 2010

    Life Cycle of a Malware.

    Well. Almost everyone reading this article knows about Computer Viruses. Though its nothing new to us, This article is an attempt to give bit detailed information on this and the Life-Cycle of a Computer Worm ..Life cycle of a computer Virus or Malware is no different from that of a Biological Virus.

    Here We go!!

    A malware is a program that performs unexpected or unauthorized, but always malicious, actions. It is a general term used to refer to viruses, Trojans, and worms. Malware, depending on their type, may or may not include replicating and non-replicating malicious code.

    Due to the many facets of malicious code or a malicious program, referring to it as malware helps to avoid confusion. For example, a virus that also has Trojan-like capabilities may be called malware.

    Hence, now we will see what exactly are the difference between a Virus, Trojan and a Malware.

    What is a virus?

    A computer virus is a program – a piece of executable code – that has the unique ability to replicate. Like biological viruses, computer viruses can spread quickly and are often difficult to eradicate. They can attach themselves to just about any type of executable file and are spread as files that are copied and sent from individual to individual.
    In addition to replication, some computer viruses share another commonality:
    a damage routine that delivers the virus payload. While payloads may only display messages or images, they can also destroy files, reformat your hard drive, or cause other damage. If the virus does not contain a damage routine, it can cause trouble by consuming storage space and memory, and degrading the overall performance of your computer.

    What is a Trojan?

    A Trojan is a Back-door entry malware that performs a malicious action, but has no replication abilities. Coined from Greek mythology's Trojan horse ( Do you remember that Hollywood flick Troy ?? J ), a Trojan may arrive as a seemingly harmless file or application, but actually has some hidden malicious intent within its code.
    Trojan malware usually have a payload. When a Trojan is executed, you may experience unwanted system problems in operation, and sometimes loss of valuable data. Good example is key loggers and Once your computer is compromised with the keyloggers every key stroke on your computer will be logged and the detailed information of whatever you typed (like password) will be stored in the local drive for future access of the intruder or it will be logged and sent to the intruder on the remote location via e-mail .

    What is a worm?

    A computer worm is a self-contained program (or set of programs) that is able to spread functional copies of itself or its segments to other computer systems. The propagation usually takes place via network connections or email attachments.
    More recent worms have also discovered ways to propagate using Instant Messengers, via file sharing applications, and by collaborating with other malware such as Trojans or other worm variants.
    WORM_BAGLE.BE, for example, forms a vicious worm-Trojan cycle with TROJ_BAGLE.BE, in which the worm mass-mails copies of the Trojan, and the Trojan downloads copies of the worm.
    Some worms may have an additional payload, such as preventing a user from accessing antivirus Web sites, or stealing the licenses of installed games and applications.

    Now let us talk about the Evolution and the Life-cycle of a virus. It includes 5 Phases .

    Phase 1 : Creation : To create a Computer Virus/Malware on needs to have the knowledge of coding .Now days , Any one with the basic knowledge of Coding and access to the internet( where you will get plenty of self- tutorial websites teaches how to write a virus )can create a virus.

    Phase 2 : Replication and Propagation

    Not all the malwares have this Replication and Propagation capabilities .Trojans can be only downloaded from the link or by installing masked application pretending to be the genuine .

    While Virus can replicate via E-mails ,IMs or with network shares and some of these has the ability to automated self-replication within a system or network.

    Phase 3: Execution

    Most malware perform their malicious activities upon execution like opening a unknown .exe file . Some have certain payloads that are activated only at a certain trigger date, or with the onset of a specific trigger condition

    Phase 4: Discovery

    This phase does not always follow activation, but typically does. When a malware is detected and isolated across the world , it is sent to the ICSA in Washington, D.C., to be documented and distributed to antivirus software developers. Vendors like Symantec or MacAfee or developer’s will create signatures or DAT files based on the pattern of the malware and will be released to the public use with their respective AV products .

    Phase 5:Assimilation

    At this point, antivirus software developers modify their software so that it can detect the new malware. This can take anywhere from one day to six months, depending on the developer and the malware type.

    Phase 6 : Eradication

    With the latest up –to-date AV programs on end user machine is the best way to eradicate majority of the Major Malware or Viruses .

    Preventive measures;

    Proactive or preventive measures are as follow but not only limited to these ;

    Make sure you have a very powerful Anti-Virus Software (McAfee Symantec or Trend Micro) running on your system and is up to date with the latest virus definition files .

    Make Sure not to visit untrusted websites or download untrusted files from the internet .

    Make sure not to open any e-mail attachment from any unknown source.



    1.