hacking module 17

Upload: jitendra-kumar-dash

Post on 29-May-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 hacking Module 17

    1/30

    NMCSP2008 Batch-I

    Module XVII

    Cryptography

  • 8/9/2019 hacking Module 17

    2/30

    Module Objectives

    What is PKI

    RSA

    MD-5 SHA

    SSL

    PGP SSH

    Encryption Cracking Techniques

  • 8/9/2019 hacking Module 17

    3/30

    Module Flow

    Public KeyCryptography

    Working ofEncryption

    RSA

    MD5Secure HashAlgorithm (SHA)

    DigitalSignatures

    Secure SocketLayer (SSL)

    RC5 Secure Shell(SSH)

    Code BreakingMethodologies

    DiskEncryption

    HackingTools

    Pretty GoodPrivacy (PGP)

  • 8/9/2019 hacking Module 17

    4/30

    Public-key Cryptography

    Public-key cryptography was invented in 1976 by

    Whitfield Diffie and Martin Hellman.

    In this system, each person gets a pair of keys, called

    the public key and the private key.

    Each person's public key is published while the private

    key is kept secret.

    Anyone can send a confidential message by just usingthe public key, but the message can only be decrypted

    using a private key that is in the sole possession of the

    intended recipient.

  • 8/9/2019 hacking Module 17

    5/30

    Working of Encryption

  • 8/9/2019 hacking Module 17

    6/30

    Digital Signature

  • 8/9/2019 hacking Module 17

    7/30

    RSA (Rivest, Shamir, Adleman)

    RSA is a public-key cryptosystem developed by MIT

    professors Ronald L Rivest, Adi Shamir, and Leonard M

    Adleman in 1977 in an effort to help ensure internet

    security.

    RSA uses modular arithmetic and elementary number

    theory to do computations using two very large prime

    numbers.

    RSA encryption is widely used and is the 'de-facto'

    encryption standard.

  • 8/9/2019 hacking Module 17

    8/30

    Example of RSA algorithm

  • 8/9/2019 hacking Module 17

    9/30

    RSA Attacks

    Brute forcing RSA factoring

    Esoteric attack

    Chosen ciphertext attack

    Low encryption exponent attack

    Error analysis

    Other attacks

  • 8/9/2019 hacking Module 17

    10/30

    MD5

    The MD5 algorithm uses a message of arbitrary

    length as its input and produces a 128-bit

    "fingerprint" or "message digest" of the input as

    its output.

    The MD5 algorithm is intended for digital

    signature applications, where a large file must

    be "compressed" in a secure manner, before

    being encrypted with a private (secret) key,

    under a public-key cryptosystem such as RSA.

  • 8/9/2019 hacking Module 17

    11/30

    SHA (Secure Hash Algorithm)

    The SHA algorithm takes as its input a message

    of arbitrary length and produces as its output a

    160-bit "fingerprint" or "message digest" of theinput.

    The algorithm is slightly slower than MD5, but

    the larger message digest makes it more secureagainst brute-force collision and inversion

    attacks.

  • 8/9/2019 hacking Module 17

    12/30

    SSL (Secure Socket Layer)

    SSL stands for Secure Sockets Layer and is a

    protocol developed by Netscape for

    transmitting private documents via the

    Internet.

    SSL works by using a private key to encrypt

    data that is then transferred over the SSL

    connection.

    The SSL Protocol is application protocol

    independent.

  • 8/9/2019 hacking Module 17

    13/30

    RC5 is a fast block cipher designed by RSA Security in

    1994.

    It is a parameterized algorithm with a variable block

    size, a variable key size, and a variable number of

    rounds. The upper limit on the block size is 128 bit.

    RC6 is a block cipher based on RC5. Like RC5, RC6 is a

    parameterized algorithm where the block size, the key

    size and the number of rounds are variable again. The

    upper limit on the key size is 2040 bits.

    RC5

  • 8/9/2019 hacking Module 17

    14/30

    What is SSH?

    The program, SSH (Secure Shell), is a securereplacement for telnet and the Berkeley r-utilities(rlogin, rsh, rcp and rdist).

    It provides an encrypted channel for logging intoanother computer over a network, executing commandson a remote computer, and moving files from onecomputer to another.

    SSH provides a strong host-to-host and userauthentication as well as secure encryptedcommunications over an insecure internet.

    SSH2 is a more secure, efficient and portable version ofSSH that includes SFTP, an SSH2 tunneled FTP.

  • 8/9/2019 hacking Module 17

    15/30

    Government Access to Keys (GAK)

    Government Access to Keys (also known as key escrow)

    means that software companies will give copies of all

    keys (or at least enough of the key that the remainder

    could be cracked very easily) to the government.

    The government promises that they would hold the keys

    in a secure way and only use them to crack keys when a

    court issues a warrant to do so.

    To the government, this issue is similar to the ability to

    wiretap phones.

  • 8/9/2019 hacking Module 17

    16/30

    RSA Challenge

    The RSA Factoring challenge is an effort, sponsored by

    RSA Laboratories, to learn about the actual difficulty infactoring large numbers of the type used in RSA keys.

    A set of eight challenge numbers, ranging in size from

    576 bits to 2048 bits are given.

  • 8/9/2019 hacking Module 17

    17/30

    distributed.net

    www.distributed.net

    An attempt to crack RC5 encryption using a network of

    computers world wide

    The client utility, when downloaded from

    distributed.net, runs the crack algorithm as a

    screensaver and send results to the distributed.net

    connected servers.

    The challenge is still running...

  • 8/9/2019 hacking Module 17

    18/30

    PGP Pretty Good Privacy

    Pretty Good Privacy (PGP) is a software packageoriginally developed by Philip R. Zimmermann thatprovides cryptographic routines for e-mail and filestorage applications.

    Zimmermann took existing cryptosystems, andcryptographic protocols, and developed a program thatruns on multiple platforms. It provides messageencryption, digital signatures, data compression ande-mail compatibility.

  • 8/9/2019 hacking Module 17

    19/30

    Code Breaking: Methodologies

    The various methodologies used for codebreaking are as follows:

    Brute Force Frequency Analysis

    Trickery and Deceit

    One-Time Pad

  • 8/9/2019 hacking Module 17

    20/30

    Cryptography Attacks

    Cryptography attacks are based on theassumption that the cryptanalyst has knowledgeof the information encrypted.

    Cryptography attacks are of seven types: Ciphertext only attack

    Known-plaintext attack

    Chosen-plaintext

    Adaptive chosen-plaintext attack

    Chosen-ciphertext attack

    Chosen-key attack

    Rubber hose attack

  • 8/9/2019 hacking Module 17

    21/30

    Disk Encryption

    Disk encryption works similarly to text messageencryption.

    With the use of an encryption program for your

    disk, you can safeguard any, and all,information burned onto the disk and keep itfrom falling into the wrong hands.

    Encryption for disks is incredibly useful if and

    when you need to send sensitive informationthrough the mail.

  • 8/9/2019 hacking Module 17

    22/30

    Hacking Tool: PGP Crack

    http://munitions.iglu.cjb.net/dolphin.cgi?action=render&category=0406

    PGP crack is a program designed to brute-force

    a conventionally encrypted file with PGP or a

    PGP secret key.

    The file "pgpfile" must not be ascii-armored.

    The file "phraselist should be a file containing

    all of the passphrases that will be used to

    attempt to crack the encrypted file.

  • 8/9/2019 hacking Module 17

    23/30

    Magic Lantern

    It is new surveillance software that would allowagents to decode the hard-to-break encrypteddata of criminal suspects.

    Magic Lantern works by infecting a suspect'scomputer with a virus that installs "keylogging"software -- a program that can capture thekeystrokes typed into a computer.

  • 8/9/2019 hacking Module 17

    24/30

    WEPCrack

    WEPCrack is an open source tool for breaking802.11 WEP secret keys.

    This tool is Perl based, and are composed of the

    following scripts: WeakIVGen.pl

    prism-getIV.pl

    WEPCrack.pl

  • 8/9/2019 hacking Module 17

    25/30

    Cracking S/MIME encryption using idleCPU time

    It tries to brute-force an S/MIME encryptede-mail message, by translating an S/MIMEencrypted message to RC2 format, and thentrying all the possible keys to decrypt themessage.

    This brute-force utility comes in two forms:

    Command line

    Screen Saver

  • 8/9/2019 hacking Module 17

    26/30

    CypherCalc

    It is a full-featured,programmable calculatordesigned for multi precisioninteger arithmetic.

    It is intended for use in thedesign, testing, and analysisof cryptographic algorithmsinvolving key exchanges,modular exponentiation,modular inverses, and

    Montgomery Math.It has built-in GCD, andSHA-1 tools, and a CRC toolthat can generate CRC tablesfor your applications.

  • 8/9/2019 hacking Module 17

    27/30

    Command Line Scriptor

    Automate file encryption/decryption digitalsigning and verification.

    Send files/e-mail securely without any userintervention.

    Ensure all of the important data is securedwithout relying on user input.

    Bulk delete files at a pre-defined date and time.

    Integrates cryptographic techniques intoexisting applications.

    Processes incoming secure files from anyOpenPGP compliant application.

  • 8/9/2019 hacking Module 17

    28/30

    Screenshot Of Command Line Scriptor

  • 8/9/2019 hacking Module 17

    29/30

    CryptoHeaven

    CryptoHeaven allows groups to send encrypted e-mail,securely backup and share files, pictures, charts,

    business documents, and any other form of electronicmedia in a secure environment.

    No third parties, including server administrators,government agencies, big brothers and others watching,have access to plaintext versions of transmittedinformation.

    Some of the features of the service include securedocument storage, secure document sharing anddistribution, secure message boards, secure e-mail, andsecure instant messaging.

  • 8/9/2019 hacking Module 17

    30/30

    Summary

    Using Public Key Infrastructure (PKI), anyone can send a confidentialmessage using public information, which can only be decrypted with aprivate key in the sole possession of the intended recipient.

    RSA encryption is widely used and is a 'de-facto' encryption standard.

    The MD5 algorithm is intended for digital signature applications,where a large file must be compressed securely before being encrypted

    SHA algorithm takes as its input a message of arbitrary length andproduces as its output a 160-bit message digest of the input.

    Secure Sockets Layer, SSL, is a protocol for transmitting privatedocuments via the Internet.

    RC5 is a fast block cipher designed by RSA Security.

    SSH (Secure Shell) is a secure replacement for telnet, and the Berkeleyr-utilities, providing an encrypted channel for logging into anothercomputer over a network, executing commands on a remote computer,and moving files from one computer to another.