Showing posts with label Digital security. Show all posts
Showing posts with label Digital security. Show all posts

Friday, June 26, 2015

Introduction to Public Key Cryptography and RSA Encryption

Cryptographically secure pseudorandom number g...
Cryptographically secure pseudorandom number generator (Photo credit: Wikipedia)
Cryptography

The art of protecting information by transforming it (encrypting it) into an unreadable format, called cipher text. Only those who possess a secret key can decipher (or decrypt) the message into plain text. Encrypted messages can sometimes be broken by cryptanalysis, also called code breaking, although modern cryptography techniques are virtually unbreakable.

Cryptography systems can be broadly classified into:-

1. Symmetric-key Cryptography(or Secret Key Cryptography):-systems that use a single key that both the sender and recipient have.

2. Public-key Cryptography:-systems that use two keys, a public key known to everyone and a private key that only the recipient of messages uses.

3. Hash Functions: Uses a mathematical transformation to irreversibly "encrypt" information

See the Picture below :-

[Image: crypto_types.gif]

Today I will discuss with you Public Key Cryptography by taking RSA Encryption as an example:-

Public-Key Cryptography(PKC)

Public-key cryptography has been said to be the most significant new development in cryptography.Modern PKC was first described publicly by Stanford University professor Martin Hellman and graduate student Whitfield Diffie in 1976. Their paper described a two-key crypto system in which two parties could engage in a secure communication over a non-secure communications channel without having to share a secret key.

PKC depends upon the existence of so-called one-way functions, or mathematical functions that are easy to compute whereas their inverse function is relatively difficult to compute. Let me give you two simple examples:

Multiplication vs. factorization: Suppose I tell you that I have two prime numbers, 3 and 7, and that I want to calculate the product; it should take almost no time to calculate that value, which is 21. Now suppose, instead, that I tell you that I have a number, 21, and I need you tell me which pair of prime numbers I multiplied together to obtain that number. You will eventually come up with the solution but whereas calculating the product took milliseconds, factoring will take longer. The problem becomes much harder if I start with primes that have 400 digits or so, because the product will have ~800 digits.

Exponentiation vs. logarithms: Suppose I tell you that I want to take the number 3 to the 6th power; again, it is relatively easy to calculate 36 = 729. But if I tell you that I have the number 729 and want you to tell me the two integers that I used, x and y so that logx 729 = y, it will take you longer to find the two values.
While the examples above are trivial, they do represent two of the functional pairs that are used with PKC; namely, the ease of multiplication and exponentiation versus the relative difficulty of factoring and calculating logarithms, respectively. The mathematical "trick" in PKC is to find a trap door in the one-way function so that the inverse calculation becomes easy given knowledge of some item of information.

Generic PKC employs two keys that are mathematically related although knowledge of one key does not allow someone to easily determine the other key. One key is used to encrypt the plaintext and the other key is used to decrypt the ciphertext. The important point here is that it does not matter which key is applied first, but that both keys are required for the process to work (Figure 1B). Because a pair of keys are required, this approach is also called asymmetric cryptography.

In PKC, one of the keys is designated the public key and may be advertised as widely as the owner wants. The other key is designated the private key and is never revealed to another party. It is straight forward to send messages under this scheme. Suppose Alice wants to send Bob a message. Alice encrypts some information using Bob's public key; Bob decrypts the ciphertext using his private key. This method could be also used to prove who sent a message; Alice, for example, could encrypt some plaintext with her private key; when Bob decrypts using Alice's public key, he knows that Alice sent the message and Alice cannot deny having sent the message.

Examples of PKC :-
  • RSA
  • Diffie-Hellman
  • Digital Signature Algorithm(DSA)
  • Elliptic Curve Cryptography (ECC)
  • ElGamal

RSA

The first, and still most common, PKC implementation, named for the three MIT mathematicians who developed it — Ronald Rivest, Adi Shamir, and Leonard Adleman. RSA today is used in hundreds of software products and can be used for key exchange, digital signatures, or encryption of small blocks of data. RSA uses a variable size encryption block and a variable size key. The key-pair is derived from a very large number, n, that is the product of two prime numbers chosen according to special rules; these primes may be 100 or more digits in length each, yielding an n with roughly twice as many digits as the prime factors. The public key information includes n and a derivative of one of the factors of n; an attacker cannot determine the prime factors of n (and, therefore, the private key) from this information alone and that is what makes the RSA algorithm so secure.

Algorithm of RSA:-

To generate the encryption and decryption keys, we can

proceed as follows.

1. Generate randomly two “large” primes 'p' and 'q'.

2. Compute 'n' = pq and 'φ' = (p − 1)*(q − 1).

3. Choose a number 'e' so that gcd(e, φ) = 1.

4. Find the multiplicative inverse of 'e' modulo 'φ', i.e., find d so that
    e*d ≡ 1 (mod φ).

This can be done efficiently using Euclid’s Ex-tended Algorithm.

The encryption public key is KE = (n, e) and the decryption private key is KD = (n, d).

The encryption function is :- E(M ) = M^e mod n.
The decryption function is :- D(M ) = M^d mod n.
These functions satisfy D(E(M )) = M and E(D(M )) = M ,for any 0 ≤ M < n.
 

Now Let's take an example which will clear the facts :-

P = 61 <- first prime number (destroy this after computing E and D)
Q = 53 <- second prime number (destroy this after computing E and D)
PQ = 3233 <- modulus (give this to others)
E = 17 <- public exponent (give this to others)
D = 2753 <- private exponent (keep this secret!)


Your public key is (E,PQ).
Your private key is D.

The encryption function is:

encrypt(T) = (T^E) mod PQ = (T^17) mod 3233

The decryption function is:

decrypt(C) = (C^D) mod PQ= (C^2753) mod 3233

To encrypt the plaintext value 123, we do this:

encrypt(123) = (123^17) mod 3233 = 337587917446653715596592958817679803 mod 3233 = 855

To decrypt the ciphertext value 855, we do this:

decrypt(855) = (855^2753) mod 3233= 123

One way to compute the value of 855^2753 mod 3233 is like this:

2753 = 101011000001 base 2,
therefore, 2753 = 1 + 2^6 + 2^7 + 2^9 + 2^11= 1 + 64 + 128 + 512 + 2048

Consider this table of powers of 855:

855^1 = 855 (mod 3233)
855^2 = 367 (mod 3233)
855^4 = 367^2 (mod 3233) = 2136 (mod 3233)
855^8 = 2136^2 (mod 3233) = 733 (mod 3233)
855^16 = 733^2 (mod 3233) = 611 (mod 3233)
855^32 = 611^2 (mod 3233) = 1526 (mod 3233)
855^64 = 1526^2 (mod 3233) = 916 (mod 3233)
855^128 = 916^2 (mod 3233) = 1709 (mod 3233)
855^256 = 1709^2 (mod 3233) = 1282 (mod 3233)
855^512 = 1282^2 (mod 3233) = 1160 (mod 3233)
855^1024 = 1160^2 (mod 3233) = 672 (mod 3233)
855^2048 = 672^2 (mod 3233) = 2197 (mod 3233)


Given the above, we can do like this:

855^2753 (mod 3233)
= 855^(1 + 64 + 128 + 512 + 2048) (mod 3233)
= 855^1 * 855^64 * 855^128 * 855^512 * 855^2048 (mod 3233)
= 855 * 916 * 1709 * 1160 * 2197 (mod 3233)
= 794 * 1709 * 1160 * 2197 (mod 3233)
= 2319 * 1160 * 2197 (mod 3233)
= 184 * 2197 (mod 3233)
= 123 (mod 3233)
= 123



References :

http://www.garykessler.net/library/crypto.html
http://plansoft.org/wp-content/uploads/knowledge/inne/RSA.pdf


Thank You. Hope you like this tutorial. Share it among your friends :)


Continue Reading →

Thursday, June 25, 2015

SecurityOverride.org Software Cracking Level 1 | Basic Serial Disclosure

SecurityOverride.org is an Information Security related site, which provides security enthusiast a platform to communicate, share this ideas, views, exploits, research, and also contains several Hacking or Security challenges which judges your skills at different levels.

A few days back I stumbled upon this site (Not for first time) and decided to sign up. After that I straight away went to the challenges section and solved a few of them and picked an interest. So in this I will be sharing how I solved the Level 1 of Software cracking challenge.

Spoilers and Excitement Alert :- People who wish to solve it of their own do not proceed any further and go straight to some other threads.


========XXX Line of Interest XXX ========

Level 1 : A software program is given in compressed .rar archive format and you're required to crack it and get the password.

Step 1 : Know Your Target.

To learn and gather more information about the format of the executable should be known, also to execute the program and see the kind of task it requires us to perform to get the data. The application should be run in a sandboxed environment for security and privacy purpose.

To understand the format and specification of the PE file specially PEiD Signature I used a tool named PortExAnalyzer made by our very own and loved Deque.


I downloaded Sandboxie, a software application which runs programs in a sandboxed environment. You can download Sandboxie from here [~ 6.6 MB]:- http://www.sandboxie.com/SandboxieInstall.exe

After you can installed Sandboxie open the application  inside the archive downloaded from the SecurityOverride site.

It looks something like this :-

[Image: clLGHSK.png]

Step 2 : Research and Reverse Engineer

Now after we have a had a look at how the main program looks like its time to derive conclusion based on facts and results. On a visual level we first notice at the icon of the PE which denotes the application is made with some .NET language, but you can't be sure. Why ? because the icon could have been changed or fuzzed in order to confuse you. So its better to cross verify. Now we analyse the PE using PortEx we downloaded earlier. Following is the trace log created when I use it on the PE.

C:\Users\Psycho\Desktop>java -jar PortexAnalyzer.jar -o PortEx-Report-SL1.txt "Software Level 1.exe"
PortEx Analyzer

Creating report file...
Writing header reports...
Writing section reports...
Writing analysis reports...
Done!

C:\Users\Psycho\Desktop>

The report has been saved with the filename "PortEx-Report-SL1.txt". Open and see if you find something interesting.

Alternatively, we can extract the sections we are interested in and that is CodeView and PEiD Signature. You can use the above but I prefer writing a code to get what I need to know rather than the complete report. So I wrote the following code in Java using Deque's PortEx Library to get the sections we are interested in :-

package com.rawcoders.REStuffs;

import java.io.File;
import java.io.IOException;
import java.util.List;

import com.github.katjahahn.parser.PEData;
import com.github.katjahahn.parser.PELoader;
import com.github.katjahahn.parser.sections.SectionLoader;
import com.github.katjahahn.parser.sections.debug.DebugSection;
import com.github.katjahahn.tools.sigscanner.SignatureScanner;

/**
*
* @author Psycho_Coder 
*
*/
public class SoScL1 {

    public static void main(String[] args) throws IOException {
        File pefile = new File("C:\\Users\\Psycho\\Desktop\\Software Level 1.exe");
        
        /*
         * Get PE Signature.
         */            
        SignatureScanner scanner = SignatureScanner.newInstance();
        boolean epOnly = true;
        List sigs = scanner.scanAll(pefile, epOnly);
        System.out.println("PEiD Signature\n");    
        sigs.forEach(System.out::println);
        
        /*    
         * Print the CodeviewInfo
         */
        PEData pedata = PELoader.loadPE(pefile);
        DebugSection debug = new SectionLoader(pedata).loadDebugSection();
        System.out.println(debug.getCodeView().getInfo());        
    }
}

The Output for the above code :-

PEiD Signature

[Microsoft Visual C# v7.0 / Basic .NET] bytes matched: 54 at address: 13470

Codeview
--------

Age:  10
GUID: f512ffaf-b4c3-4f5a-b634-aa8f46bb8dce
File: C:\Users\overide\Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplicati​on1.pdb

Observations

The following gives the location of the pdb (Program database) file commonly used by .NET applications. From the forensic point of view the Username of the System that "overide" is important since it tells us that someone with a system account name "overide" made this (Most Probably but not with conclusive evidence)

Codeview
--------

Age:  10
GUID: f512ffaf-b4c3-4f5a-b634-aa8f46bb8dce
File: C:\Users\overide\Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplicati​on1.pdb
---------------------------------------------------------------------------------------------------------------

The following PEiD Signature tells us that the Application was programmed with C#.

PEID Signatures
***************

[Microsoft Visual C# v7.0 / Basic .NET] bytes matched: 54 at address: 13470

From here on we have two approaches. First we open the exe using any Hex Editor and see if we can find something interesting or if we can directly get the Serial from there(this step can be done earlier too). Now its a common sense that the serials or the password required will be stored in a string when it was coded (Not necessarily true because I can store them in hex or other encrypted format too which is being changed to other form by some other instructions.). So if you open the exe with any hex editor and observe thn you will come across something like this which is the serial we want :-

[Image: rS4fhbX.png]

The problem with this method is that if any PE file which is large in size or the serials are encrypted in some some binary form then it will be a problem to manually look for the serial and it could get difficult. So we will focus on the second approach which is much more easy.

Lets move on to the next approach. Based upon the above observation we can downloaded any .NET decompiler to reverse engineer the code. For such purpose you can use different tools, several free applications are available. The better one's would be ILSpy and dotPeek.

Download ILSpy : https://github.com/icsharpcode/ILSpy/releases/download/2.3/ILSpy_Master_2.3.0.1827_Binaries.zip
Download dotPeek : https://www.jetbrains.com/decompiler/download/

I will give show you both of them. You need to install ILSpy but dotPeek doesn't needs any installation.

Now all you have to do is open the PE file we have to crack with ILSpy or dotPeek and then locate :- "WindowsApplication1\Form1\button1_Click" and double press it to see the decompiled code. button1.Click is the event for the Register button. On the main panel the Serial Number and Password which you will be prompted with is clearly isible.

Observe the Images

ILSpy
[Image: ljUQZSy.png]

dotPeek
[Image: vtE1wKx.png]

Step 3 :Verify your Findings

So, these were the number of steps you can perform to get the serial and password. The following shows the password when you enter the password.
[Image: 9ETeKT7.png]


Conclusion

For software cracking, that concepts we learnt are applicable for many different scenarios and in different ways too like Source Code Theft forensics, Secure Code analysis etc.

I hope you enjoyed the tutorial. Stay tuned for the next Level 2 Walkathrough.

Tool Summary

1. PortExAnalyzer
2. Sandboxie
3. ILSpy or dotPeek.

Thank you,
Sincerely,
Psycho_Coder.
Continue Reading →

Thursday, June 18, 2015

Hash Algorithm Identifier | Identify CryptoHash Types

Hash Algorithm Identifier is a tool which can be used to identify almost all types of hashes. This tool can detect the password hash of various forums like MyBB, phpBB3, Drupal, Joomla, wordpress etc.

I wrote a tutorial earlier on how to identify the different types of hashes and you can see that tutorial here. If you don’t know what a Hash Function is then I recommend you to read about it  here


Those who have used Kali Linux for different puposes, they might have come across a tool named hash-identifier and the link to the source of the tool :- https://code.google.com/p/hash-identifier/

But the tool is poorly programmed with a huge if-else-if ladder and method construct and some of them are not correct, exceeding 500+ LOC.


Here’s my version of HashIdentifier. (# of lines of code : 210 [With New lines and docstrings])

Screenshot

[Image: yuiiCFV.png]

Installing Required Packages using requirements.txt, Starting HashIdentifier Server on localhost, using the webservice
[Image: F2X5btc.png]

Using Hash Identifier Web Service

Python Code and Demonstration to Use Hash Identifier Web Service
[Image: NPs3Q60.png]
 
The style and design of the code has been kept same as the original hash-identifier in the Google-code project link given above.

How to Use [Instructions for Linux/Mac users] ?

To use this simply run (The app will start):-

python HashIdentifier.py

To give executable permissions, run :-
 
chmod +x HashIdentifier.py

and then starting it by executing (One’s the executable is made you can start it by typing the following text only):-
 
./HashIdentifier.py

If you don’t understand the steps above then don’t worry. I have included a start.sh [for Linux] and a start.bat [for Windows] files to make your life more easier

To execute the start.sh, type the following in the terminal :-
 
sh start.sh
 
Hash-Algorithm-Identifier Web Service

Hash-Algorithm-Identifier is now on Cloud and provides a web service to use it directly in your apps or so and so. The wrapper for web service is provided asweb.py. The Cloud app service is hosted at http://hashid.badwith.computer/

Usage instructions

./web.py or see --help for more options
 
To use the cloud service send a get (for single hash) or post (for multiple hash) request with the hash appended at the end of the url given above. In case you want the result for multiple hashes then in such cases send the hashes as JSON data.

Javascript

var hash = "3da541559918a808c2402bba5012f6c60b27661c";
 cors_request = new XMLHttpRequest();
 cors_request.onreadystatechange = function() {
 if (cors_request.readyState == 4) {
    console.log(cors_request.responseText);
    }
 }
 cors_request.open("GET", "http://hashid.badwith.computer/" + hash);
 cors_request.send();

Python Sample Example

import requests
hsh = "3da541559918a808c2402bba5012f6c60b27661c"
resp = requests.get("http://hashid.badwith.computer/%s" % hsh)
print(resp.text)

Python Example : Multiple hashes

import json
import requests
hashes = {'hashes': [
 "3da541559918a808c2402bba5012f6c60b27661c",
 "912ec803b2ce49e4a541068d495ab570"
 ]}
resp = requests.post("http://hashid.badwith.computer/", data=json.dumps(hashes))
print(resp.text)

The response is received as JSON data. The Demo usage has been already shown above under the screenshots header..

Thanks to moloch for contributing to the cloud app.

About the Code

As it is evident from the code that I have used regular expressions to identify the hashes. The hashes are being identified because they have certain characteristics and when matched properly they will produce the proper results. Using regular expressions to identify the hash makes the code neat and easy to understand. To understand the regex expressions used in the code, VISIT THIS SITE and paste the Regex Expression in its proper place and thereby you get the explanation. 

Suggestion and feedback are welcome. The tool will be updated with more new features and hashes for identification.

Quick Links


Thank you,
Sincerely,
Psycho_Coder

Continue Reading →

Cryptography | Identify Different types of Hashes

Cryptographically secure pseudorandom number g...
Cryptographically secure pseudorandom number generator (Photo credit: Wikipedia)
Hello Everyone,

If you are a hacker or a computer Geek or programmer or a general enthusiast regarding computing then you might have come across the term hash or cryptographic hash functions. Many a times even people call hashes as encryption which is absolutely wrong. This is going to be a short tutorial and we will be dealing with how to identify the various types of hashes that we come across. I hope after reading this tutorial you will have some idea that how to identify hashes.

Reader's Note:-

I assume the following while making this tutorial:-

1. You know basics of cryptography. If you don't then read this.
2. You have some experience with programming (though not required much in this tutorial bit its good to know as they will help you understand better).
3. You know basics of PHP [optional].

Let's Begin


Identifying MD5

MD5 hash : It is one of the most common type of hash function and it is used in many sites and is applied in different fields. Used in phpBB v2.x, Joomla version below 1.0.13 and many other forums and CMS.

Reasons for a hash to be MD5

Length: 32 characters.
Description: They are always 32 characters in length (16 Bytes).They are always hexadecimal (Only use characters 0-9 and A-F)
Algorithm: Same as the md5() function in PHP.

Example :- f5d1278e8109edd94e1e4197e04873b9
 
MD5 (UNIX) : Used in Linux and other similar OS.

Length: 34 characters.
Description: The hash begins with the $1$ signature, then there goes the salt (up to 8 random characters; in our example the salt is the string "12345678"), then there goes one more $ character, followed by the actual hash.
Algorithm: Actually that is a loop calling the MD5 algorithm 2000 times.

Example:- $1$12345678$XM4P3PrKBgKNnTaqG9P0T/
 
MD5 (APR) : Used in Linux and other similar OS.

Length: 37 characters.
Description: The hash begins with the $apr1$ signature, then there goes the salt (up to 8 random characters; in our example the salt is the string "12345678"), then there goes one more $ character, followed by the actual hash.
Algorithm: Actually that is a loop calling the MD5 algorithm 2000 times.

Example:- $apr1$12345678$auQSX8Mvzt.tdBi4y6Xgj.
 
MD5 (phpBB3) : Used in phpBB 3.x.x.

Length: 34 characters.
Description: The hash begins with the $H$ signature, then there goes one character (most often the number '9'), then there goes the salt (8 random characters; in our example the salt is the string "12345678"), followed by the actual hash.
Algorithm: Actually that is a loop calling the MD5 algorithm 2048 times.

Example: $H$9123456785DAERgALpsri.D9z3ht120
 
MD5(Wordpress) : Used in Wordpress sites.

Length: 34 characters.
Description: The hash begins with the $P$ signature, then there goes one character (most often the number 'B'), then there goes the salt (8 random characters; in our example the salt is the string "12345678"), followed by the actual hash.
Algorithm: Actually that is a loop calling the MD5 algorithm 8192 times.

Example:- $P$B123456780BhGFYSlUqGyE6ErKErL01

Identifying Salted MD5

Salted MD5 - Used in a large amount of applications to increase hash parity and to increase the time it takes to crack.

General Description : They consist of two blocks connected by a colon, the first is the hash the second is the salt. The first part of the salted hash is hexadecimal, the second is variable case alphanumeric. They first part will always be 32 characters long. The second part can be any length.

md5($pass.$salt) :Used in WB News, Joomla version 1.0.13 and higher.
Length: 16 bytes.

Example:- 6f04f0d75f6870858bae14ac0b6d9f73:1234
 
md5($salt.$pass) : Used in osCommerce, AEF, Gallery and other CMS.
Length: 16 bytes.

Example:- f190ce9ac8445d249747cab7be43f7d5:12
 
md5(md5($pass)) : Used in e107, DLE , AVE, Diferior, Koobi and other CMS.
Length: 16 bytes.

Example:- 28c8edde3d61a0411511d3b1866f0636
 
md5(md5($pass).$salt) :Used in vBulletin, IceBB.
Length: 16 bytes.

Example:- 6011527690eddca23580955c216b1fd2:wQ6
 
md5(md5($salt).md5($pass)) : Used in IPB.
Length: 16 bytes. 
 
Example:- 81f87275dd805aa018df8befe09fe9f8:wH6_S

md5(md5($salt).$pass) : Used in MyBB.
Length: 16 bytes. 
 
Example:- 816a14db44578f516cbaef25bd8d8296:1234
 
md5($salt.$pass.$salt) : Used in TBDev.
Length: 16 bytes.

Example:- a3bc9e11fddf4fef4deea11e33668eab:1234
 
md5($salt.md5($salt.$pass)) : Used in DLP (More info. :- Here).
Length: 16 bytes. 
 
Example:- 1d715e52285e5a6b546e442792652c8a:1234
Identifying SHA

SHA-1 : Used frequently on the internet and is one of a large family of Secure Hash Algorithms.Used in many forums and CMS.
Length: 20 bytes.
Description :They are always 40 Characters in length (160 bits).They are always hexadecimal (Only use characters 0-9 and A-F).
Algorithm: Same as the sha1() function in PHP. 
 
Example: 356a192b7913b04c54574d18c28d46e6395428ab

sha1(strtolower($username).$pass) : Used in SMF.
Length: 20 bytes.

Example:- Admin:6c7ca345f63f835cb353ff15bd6c5e052ec08e7a
 
SHA-256(Unix) : Used in Linux and other similar OS.
Length: 55 characters.
Description: The hash begins with the $5$ signature, then there goes the salt (up to 8 random characters; in our example the salt is the string "12345678"), then there goes one more $ character, followed by the actual hash.
Algorithm: Actually that is a loop calling the SHA-256 algorithm 5000 times.

Example: $5$12345678$jBWLgeYZbSvREnuBr5s3gp13vqiKSNK1rkTk9zYE1v0

SHA-512(Unix) :Used in Linux and other similar OS.
Length: 98 characters.
Description: The hash begins with the $6$ signature, then there goes the salt (up to 8 random characters; in our example the salt is the string "12345678"), then there goes one more $ character, followed by the actual hash.
Algorithm: Actually that is a loop calling the SHA-512 algorithm 5000 times. 
 
Example:- $6$12345678$U6Yv5E1lWn6mEESzKen42o6rbEmFNLlq6Ik9X3reMXY3doKEuxrcDohKUx0Oxf44aeTI​xGEjssvtT1aKyZHjs

Identifying Salted SHA

sha1($salt.sha1($salt.sha1($pass))) : Used in Woltlab BB.
Length: 20 bytes.

Example: cd37bfbf68d198d11d39a67158c0c9cddf34573b:1234
Identifying Other hash types

MySQL < 4.1 : These aren't used very often but still come up on very often because people have no idea what to do with them, they are used in older versions of MySQL.

Length : 16 characters(8 bytes)
Description :They are always hexadecimal (Only use characters 0-9 and A-F).

Example:- 606727496645bcba
MYSQL5 : Used in newer versions of MYSQL to store database user passwords.
Length: 41 characters
Description :They are always capitalized. They always begin with an asterisk .
 
Example:- *C8EB599B8E8EE7BE9F1A5691B7BC9ECCB8DE1C75
DES(Unix) : Used in Linux and other similar OS.
Length: 13 characters.
Description: The first two characters are the salt (random characters; in our example the salt is the string "Iv"), then there follows the actual hash.

Example:- IvS7aeT4NzQPM

Domain Cached Credentials :Used for caching passwords of Windows domain.
Length: 16 bytes.
Algorithm: MD4(MD4(Unicode($pass)).Unicode(strtolower($username)))

Example:- Admin:b474d48cdfc4974d86ef4d24904cdd91

I hope this information is useful to you and I belief that this post will help many others. 

References : Here
Continue Reading →

Using Dban to Securely Wipe data from hard disk

"DBAN is free erasure software designed for the home user. It automatically deletes the contents of any hard disk that it can detect. This method can help prevent identity theft before recycling a computer. DBAN is also a commonly used solution to remove viruses and spyware from Microsoft Windows installations. "
--- Original Site < http://dban.org/ >

About its short commings and drawbacks read the info from the original site (link given above)

So lets move directly into how to use it. The tool comes in a iso format and you can either write it on CD/DVD or on flash drive. I would recommenend you to use it on a flash drive since its on 15 mb in size and if you use a CD or DVD then its wasted.

I will first show you how to use dban by creating a Virtual machine for ir. I am using Virtual Box which comes by default in fedora 19 (I am using fedora 19 at present).

So first download the iso file from here : http://sourceforge.net/projects/dban/files/dban/dban-2.2.8/dban-2.2.8_i586.iso/download

The file is only ~15 MB in size and so the download will be quick.  I downloaded it here :-

[Image: oGeI1wu.png]

Now download and install virtual box or VMware Player which ever you wish to use. I am using Virtual Box. If you don't have them already then you can download them from the following :-

Virtual Box : https://www.virtualbox.org/wiki/Downloads

VMware Player:
https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0

The application I am using is called Boxes and is more like Virtual Box and comes installed with Fedora 21. So open Boxes and click new.

[Image: YvYj2c4.png]

You will get the following screen :-

[Image: PN56jos.png]

Click on Continue and the following screen will appear :-

[Image: N5i0iAw.png]

As you can see Virtual Box have already listed the ISO's but if it doesn't shows up then you can Click on Select File and Choose the DBAN ISO file

[Image: dDvKPrV.png]

After you choose open the following screen will appear :-

[Image: gigq28H.png]

If you wanna customize then click on customize. After you do so you will :-

[Image: tkCeThd.png]

But in our case there is nothing to customize we are wiping data. You will probably perform it on your complete HDD and so it unnecessary. If you have done this much then click on Create on Top right corner (in case of Virtual Box)

[Image: 3tSKzdi.png]

The following screen will appear showing the different DBAN options and its main interface:-

[Image: aDlyG64.png]

Click on the blue screen to enter the VM. If you press Enter autonuke setting will start which is the default and the recommended option. To see the other cmmands available press F3. You will see the following :-

[Image: RXNHezV.png]

We will go with the default option and we will press enter on the first screen screen that appears. After we do so will see the following :-

[Image: 4HFvDVv.png]

[Image: YofN2FX.png]

Now its will list all your HDD or flash drives attached. Now select the drive you want to wipe and press SPACE to select it. You can use UP and DOWN keys to select other drives (if any). After you have done this press F10 to start the process.

[Image: ughSSHV.png]

You will be able to see the time remaining to complete, no. of rounds or number of steps etc etc.Once the process s complet a black screen will come with the confirmation that the data has been wiped clean :)


Install using Flash Drive

To use dban using a flash drive you first need to write it onto the drive itself.

To write the ISO in flash drive I would recommened you to use Universal USB Installer if you're on Windows Since it comes with a pre loaded config for DBAN ISO and so it will be better imho. Linux users can use Unetbootin.

After you have done so simply boot your system and from Boot Options run using the flash drive and the rest i like I explained above after you create the VM.

Thats all for today and I hope you like the tutorial.
 
 
Continue Reading →

Wednesday, June 17, 2015

100 Best Open Source Security Tools

English: A candidate icon for Portal:Computer ...
English: A candidate icon for Portal:Computer security (Photo credit: Wikipedia)
Whether you’re a network administrator, security professional, or an end user, it’s important that you keep your system clean and secure. There are a variety of high quality open source security tools available, and many of them are free. Check out this list to find 100 of the best of them.

 
General

These tools offer a variety of useful security functions.
  1. Untangle: Untangle will provide you with spam, virus, and spyware protection, as well as Web filtering, firewall, and more.
  2. Network Security Toolkit: This tool combines a variety of open source apps that will help you stay on top of traffic, intrusions, and more.
  3. Bastille Linux: With this tool, you’ll answer questions about your security, and will get a custom lockdown for your machine.
  4. OSSIM: OSSIM brings together a number of open source security tools to give you network details and stay on top of intrusions.
  5. ProShield: Use Proshield to get a scan of your system for up to date software and malware.
  6. Hardened Linux: This Linux distribution will help you improve your security.
  7. eBox Platform: Use this network management framework for content filtering, proxy, firewalls, and more.sa
  8. Kismet: Kismet offers wireless network detection, intrusion detection, and packet sniffing, all in one.
Monitoring

With these tools, you’ll get constant monitoring of your security.
  1. Nessus: Use this free scanner to stay on top of your vulnerabilities.
  2. Nagios: This host and network monitoring tool will let administrators handle outages before clients and users are affected.
  3. AWStats: Use AWStats to get a look at attacks on your server.
  4. Honeytrap: With this tool, you’ll get advanced warning about attacks.
  5. The Multi Router Traffic Grapher: Use this tool to monitor your SNMP network devices.
  6. Snort: Snort is an incredibly effective intrusion detection system.
  7. BASE: This tool works well with Snort to make your intrusion detection data more easy to understand.
  8. Internet Secure Access Kit: This suite will help you restrict and monitor access on your network.
  9. Afick: Afick will help you stay on top of changes to your system.
  10. Network Security Analysis Tool: Use this tool to scan your network for vulnerabilities.
  11. Nagios: This program will monitor your enterprise network services, environmental factors, host resources, and point out potential vulnerabilities.
  12. JbroFuzz: With this tool, you can test the integrity of your network.
  13. Yet Another Security Monitoring Interface: This web based application will help you take a look at the data flow in your router.
  14. ettercap: Ettercap will monitor your LAN, staying on top of content, live connections, and other potential attacks.
  15. Metasploit: Often used by hackers, you can test your system with this tool.
  16. SNARE: Make use of this tool that collects and analyzes your event log data.
  17. Nikto: Nikto will scan your web servers for problems and dangerous files.

Email & Spam

Use these tools to keep your email secure.
  1. Spam Assassin: This anti-spam tool will help you keep your email neat and clean.
  2. Tiger Envelopes: This email encryption tool works with a variety of programs, including Thunderbird and Outlook.
  3. Anti-Spam SMTP Proxy Server: Use this application to filter out spam and viruses.
  4. Spamato: With this client-side spam filter, you can keep the junk out of your Outlook, Thunderbird, and other popular email clients.
  5. phPOP3clean: Use this scanner to look for worms, spam, blacklisted words, as well as blacklisted domains.
  6. Thunderbird: This open source email program has a variety of tools for keeping spam and viruses at bay.
  7. Mailsaurus: This email client will encrypt all of your data so that no one can read your email.
  8. MailCleaner: With this filtering application, you can keep the spam and viruses out.
  9. Web Stat: Want to know how much spam you’re blocking? Use this tool that will display your level of blocked spam graphically.
Anti-Virus

With these tools, you can protect your computer and network from viruses.
  1. FullControl: This software will stay on top of all the programs running on your computer and verify their integrity.
  2. ClamAV: Make use of this excellent antivirus tool to keep your machine free of viruses.
  3. ClamWin: If you want to take advantage of ClamAV on your Windows machine, make use of this tool.
  4. Moon Secure Antivirus: This antivirus scanner also features a firewall.
  5. Winpooch Watchdog: Winpooch will stay on top of spyware, trojans, and viruses.
  6. Softlabs AntiVirus: Using this antivirus tool, you can scan your email for phishing and viruses.

Firewall

Use these firewall tools to keep unwanted intruders and items out of your system.
  1. SELinux: Using SELinux, you can set mandatory access control features for Linux.
  2. m0n0Wall: This tool offers both firewall and VPN.
  3. ShellTer: ShellTer offers a firewall with SSH protection.
  4. Endian Firewall Community: Use this tool to turn an old PC into an appliance that provides a variety of security functions.
  5. FirewallPAPI: This system will stay on top of your network traffic.
  6. SmoothWall Express: Use SmoothWall to turn a PC into a firewall appliance for your network.
  7. WIPFW: Use this tool to monitor and filter packets entering your network.
  8. Fail2Ban: Fail2Ban will stay on top of log files and look for failure prone IPs, which will be blacklisted.
  9. Vyatta: Turn to Vyatta to get an enterprise class firewall for free.
  10. ISP-FW: With this server side firewall application, you can get packet filtering and monitoring.
  11. Firewall Builder: This tool will make it easy to establish rules for your firewall.
  12. AppArmor: Create policy-based profiles to control access to applications with AppArmor.
  13. Firestarter: Make use of this firewall if you want to get your firewall security up and running in a hurry.
  14. Linux Embedded Appliance Firewall: This firewall tool will help you shore up your security.
  15. IPCop: With this tool, you can turn any PC into a firewall appliance to get your network secure.
Files & Data

Keep your files, data, and transfers secure with these tools.
  1. Darik’s Boot and Nuke: If you want to wipe out a hard drive, just boot up with a disk containing this tool.
  2. Packet Generator: Use this tool to optimize the routing schematics for your network.
  3. Paros: Paros intercepts data, offering a way to evaluate web application security.
  4. Cyberduck: With this tool, you can transfer files to remote computers and networks.
  5. WinSCP: Use this SFTP and FTP client for secure file transfes.
  6. Eraser: This tool will eliminate files by overwriting them several times, so that they can’t be read using digital forensic tools.
Encryption & Cryptography

Make use of these encryption and cryptography tools to stay secure.
  1. KeyCzar: Use this toolkit to make cryptography easier to use in applications.
  2. Cameloid: Keep your voice connections safe with this encryption tool.
  3. GNU Privacy Guard: This encryption tool uses a number of different encryption algorythms.
  4. TrueCrypt: Use TrueCrypt to encrypt a partition or drive, or create a virtual encrypted disk within a file.
  5. Cryptonit: Secure your files and address books with this encryption tool.
  6. Checkpoint Commander: This tool will both encrypt and completely erase your files.
  7. AxCrypt: AxCrypt is a simple encryption tool that will allow you to encrypt files with just a few clicks.
  8. Magikfs: You can hide your files using this tool with a steganographic filesystem.
  9. FreeOTFE: This tool will create secure virtual drives on your PC.
  10. Cryptology: Cryptology offers encyption that integrates into Windows Explorer right-click menus.
Passwords

With these tools, you can keep your passwords handy and secure.
  1. KeePass: Use this password safe to keep all of your passwords safe and encrypted.
  2. CiphSafe: This tool will encrypt your usernames and passwords for popular Internet websites.
  3. Password Safe: Password Safe will help you create strong passwords and can store multiple password databases.
  4. Keep It Secret! Keep It Safe!: With this tool, you can store your important usernames and passwords in an encrypted file.
Remote Access

Use these tools for secure remote access.
  1. OpenSSH: With this tool, you can safely operate a remote host.
  2. Stunnel: Stunnel will encrypt your TCP connections inside SSL connections.
  3. OpenVPN: Get safe VPN access using this tool.
  4. SSL-Explorer: This web-based VPN server will allow you to use a standard browser.
  5. Open SSL: This tool uses Transport Layer Security and Secure Socets Layer protocols to keep you safe.
  6. strongSwan: strongSwan offers an IPsec-based VPN tool for Linux.
  7. PuTTy: Get remote access with this telnet/SSH client.
  8. UltraVNC: Use this tool to get safe and secure remote access.
Networking

These tools will help you operate a more secure network.
  1. Nmap: Nmap will help you stay informed of all of the hardware that is connected to your network.
  2. Wireshark: Using Wireshark, you can take a look at all of the traffic that passes over your Ethernet network.
  3. Bro: Bro offers network intrusion detection that will passively monitor your network traffic for anomalous traffic behavior.
  4. Network Simulator and Network Animator: With this tool, you can test your network flow to prevent bottlenecks and promote better routing.
  5. OCS Inventory NG: This tool will provide you with a list of hardware and software on your network.
  6. Netcat: Netcat is a simple utility that will help you read and write data across UDP or TCP network connections.
  7. Angry IP Scanner: This tool will scan IP adresses and ports on your network.
  8. Ossec HIDS: With this intrusion detection system, you’ll find out when your network is being attacked.
  9. TcpDump: If you’re looking for a light, secure packet sniffer, check out this tool.
  10. The Network Visualizer: Get graphic information on your network activity using this tool.
Miscellaneous

Check out these tools for even more open source security applications.
  1. Tripwire: Find out when changes are made to your system by using this tool.
  2. Firefox: A very popular web browser, Firefox offers a variety of secure options and add ons.
  3. The Sleuth Kit: With this kit, you can recover deleted files.
  4. JAP: This tool will allow you to browse the Internet anonymously.
  5. iSAK: Using this tool, you can filter out specific types of websites.
  6. Advisory Check: This tool will read RSS and XML security feeds to monitor the security of the software you’re using.
  7. Babel: Babel will let you know about all of the security flaws that you have in your system.
 
Continue Reading →

Follow Me!

Popular Posts

Followers

Visitor Map