May 3rd, 2010ERiDeM API .NET

This project contains a set of easy classes that I have done for different proposes. There are classes for security, serialization and so on. The list and information about the classes are in its main page.

You can download the source code and binaries from my #Code website: http://code.eridem.net/projects/show/eridemapi-csharp

It is a tool that help us to do Blind SQL Injection attacks to prove the security in our webpages. It is a tool to detect the security on the arguments in our websites and it must not be used to attack websites or another illegal proposes.

This tool was developed by Alex Soler and Miguel Ángel Domínguez.

You can download the source code and binaries from the Google Code website: http://code.google.com/p/secblindsqlinjection/

March 21st, 2010Homemade Kerberos

Homemade Kerberos was an assignment which I did in a security course. It is programmed in C# with .NET Remoting. In the project we can find a KDC server and two clients which want to communicate between each other using a Kerberos protocol. The implementation of this Kerberos is the simplest and it should be used only for educational proposes.

Index

  1. Introduction
  2. Dicctionary attack
  3. Description
  4. An example
  5. Download (I don’t want to know what it does! Just do it!)
  6. How to use it

1. Introduction

This article is about a program which can clean, sort and delete repeated words in your wordlists. You can download it directly in the Download section, but I recommend you read the full article to know why you could neet it and how it works.

2. Dictionary attack

In cryptanalysis and computer security, a dictionary attack is a technique for defeating a cipher or authentication mechanism by trying to determine its decryption key or passphrase by searching likely possibilities.

A dictionary attack uses a brute-force technique of successively trying all the words in an exhaustive list (from a pre-arranged list of values). In contrast with a normal brute force attack, where a large proportion key space is searched systematically, a dictionary attack tries only those possibilities which are most likely to succeed, typically derived from a list of words in a dictionary. Generally, dictionary attacks succeed because many people have a tendency to choose passwords which are short (7 characters or fewer), single words found in dictionaries or simple, easily-predicted variations on words, such as appending a digit.

When we want to perform this kind of attack, we usually have several wordlists in separate files: common English words, cities, names, medical words and so on. But many of those words are repeated in most of the wordlists files. For example, it is usual to find these words into the wordlist file as “12345 qwerty asdfg a aa aaa aaaa”, because people who built these wordlists added only the common words. When we use a large list of words, we accumulate repeated words. If we do not have a large number of words in a reduced number of wordlist files, the time that we waste in operations and time is not so important, but when we use wordlists with a huge number of words (10,000 words or more) with repetitions, we need to optimize it.

3. Description

The proposed algorithm will clean this huge word lists. It will delete all repeat words, clean spaces and new lines, and sort all words. So, this algorithm will perform the following tasks:

  1. Clean spaces and add a new line between words.
  2. For each wordlist file, sort all words.
  3. For each wordlist file, remove repeat words.
  4. Compare every file with the others to remove repeated words and save the result in the second compared file.

These tasks are optimized, and the program already does several tasks at the same time. Anyway, the hardest task is to compare every file with the others, although this task is optimized to not repeat comparisons.

Using this algorithm, we can reduce up to 40-50% of time that a dictionary attack could spend.

4. An example

We have four files in our computers, FileA, FileB, FileC, FileD, (table 4.1) with different words. Maybe the words of these files are repeated or maybe not. In total, we have 36 words, including repeated words.

FileA FileB FileC FileD

g h

e

a b c d

f

i j

m n

l

k a f

o p

m a b

q

q q q r s

s v

j q s

t u

a w

Table 4.1: Total words: 36.

Task 1, 2, 3: For each file: Clean spaces. Add a new line between words. Sort words. Remove repeat words (table 4.2).

FileA FileB FileC FileD

a

b

c

d

e

f

g

h

a

f

i

j

k

l

m

n

a

b

m

o

p

q

r

s

a

j

q

s

t

u

v

w

Table 3.2: Total words: 32.

Task 4: Compare file by file to remove repeated words. In the example, Six comparison shall be performed: <fileA, fileB>, <fileA, fileC>, <fileA, fileD>, <fileB, fileC>, <fileB, fileD>, <fileC, fileD>. The first wordlist file is compared with the second one, and as a result, from the second wordlist all words, which are in both wordlist, will be deleted. So, the first four comparisons (file A comparisons) will be shown in table 4.3.

FileA FileB FileC FileD

a

b

c

d

e

f

g

 

i

j

k

l

m

 

m

o

p

q

r

s

j

q

s

t

u

v

w

Table 4.3: Total words: 25.

Task 4: By comparing the rest of the files: <fileB, fileC>, <fileB, fileD> and <fileC, fileD>, the final state of files are shown in the table 4.4.

FileA FileB FileC FileD

a

b

c

d

e

f

g

 

i

j

k

l

m

 

o

p

q

r

s

t

u

v

w

Table 4.4: Total words: 21.

The reduction in the number of words are from 36 to 21 which is a 41.6% less of the original word list file.

5. Download

You can download the shell script if you accept the GPL v3 license, and if you accept it, YOU ARE RESPONSIBLE of any kind of damage as: lost of data, deleted files, or any other problems in your hardware, software or system.

EXECUTE IT WITH PRECAUTION! Read the “How to use it” section.

Download <Clean wordlists> version 0.0.1!!!

6. How to use it

After downloading it, change the execution permissions:

chmod +x cleanwl.sh

Then, copy it into the folder where you have the wordlists files you want to clean and execute the script: 

[path_of_the_script]/cleanwl.sh

for example: ./cleanwl.sh

It will show you the statistics of the process, but if you don’t want to see that, you can redirect it to a file or to /dev/null. IMPORTANT: if you decide to redirect the output to a file, redirect it into another folder, not in the same folder that the wordlists files!!

for example: ./cleanwl.sh > ../stats.txt

Using this algorithm, we can reduce up to 40-50% of time that a dictionary attack could spend.

Friendly Korea Community Screenshot

The Friendly Korea Community API is an API (Application Programming Interface) which brings us the possibility of use simple classes for access to the data of the website http://chingu.prkorea.com.

On Friendly Korea Community, you are able to find korean and international friends how love Korea culture, music, people, movies, food, so on. Furthermore, you can join in the community and post messages to people how are there. To sum up, it’s a kind of Korean’s Facebook.

Nowadays, I have a beta version with several classes. With this classes, an user can:

  1. login as user, see his complete own information (name, family name, country, gender, …), see his photo URL.
  2. watch a list of his friends with their names, photos URL and their complete information (name, family name, country, gender, …).

DownloadDownload this file from SourceForge.net
Friendly Korea Community API – 0.1.0
Last Update: May 15 2009
SourceForge.net

Complete Code Example (v.0.0.2)

<?php
include_once(‘Fkc.class.php’);

// Login settings $email = ‘[YOUR_FKC_USER_EMAIL]‘;
$password = ‘[YOUR_FKC_USER_PASSWORD]‘;

// Creating a new instance of FKC API
$fkc = new Fkc();

// Logining into FKC
if (!$fkc->login($email, $password))
{
  echo “It is a wrong email or password.”;
  die();
}

// Getting a object of FkcUser that represents our user.
$me = $fkc->getUser();

// Getting our friends. It’s and array of FkcFriend.
$friends = $me->get(‘Friends’);

// Showing our information
echo “<h1>Our information: “ . $me->get(‘Name’) . ” “ . $me->get(‘FamilyName’) . “</h1>” .
  “&nbsp; <b>Id</b>: “ . $me->get(‘Id’) . “<br />” .
  “&nbsp; <b>Email</b>: “ . $me->get(‘Email’) . “<br />” .
  “&nbsp; <b>Gender</b>: “ . $me->get(‘Gender’) . “<br />” .
  “&nbsp; <b>Born Date</b>: “ . $me->get(‘BornDate’) . “<br />” .
  “&nbsp; <b>Country</b>: “ . $me->get(‘Country’) . “<br />” .
  “&nbsp; <b>Residential Country</b>: “ . $me->get(‘ResidentialCountry’) . “<br />” .
  “&nbsp; <b>Residential City</b>: “ . $me->get(‘ResidentialCity’) . “<br />” .
  “&nbsp; <b>Profession</b>: “ . $me->get(‘Profession’) . “<br />” .
  “&nbsp; <b>Interests</b>: “ . $me->get(‘Interests’) . “<br />” .
  “&nbsp; <b>About me</b>: “ . $me->get(‘About’) . “<br />” .
  “&nbsp; <b>Favorite Movie</b>: “ . $me->get(‘FavoriteMovie’) . “<br />” .
  “&nbsp; <b>Favorite Entertainent</b>: “ . $me->get(‘FavoriteEntertainent’) . “<br />” .
  “&nbsp; <b>Favorite Drama</b>: “ . $me->get(‘FavoriteDrama’) . “<br />” .
  “&nbsp; <b>Favorite Place</b>: “ . $me->get(‘FavoritePlace’) . “<br />” .
  “&nbsp; <b>Favorite Food</b>: “ . $me->get(‘FavoriteFood’) . “<br />” .
  “&nbsp; <b>Photo URL</b>: “ . $me->get(‘Photo’) . “<br /><br />”;

// Showing friends information echo “<h1>My friends</h1><br />”;
foreach ($friends as $friend)
{
  echo “<h2>” . $friend->get(‘Name’) . ” “ . $friend->get(‘FamilyName’) . “</h2>” .
    “&nbsp; <b>Id</b>: “ . $friend->get(‘Id’) . “<br />” .
    “&nbsp; <b>Email</b>: “ . $friend->get(‘Email’) . “<br />” .
    “&nbsp; <b>Gender</b>: “ . $friend->get(‘Gender’) . “<br />” .
    “&nbsp; <b>Born Date</b>: “ . $friend->get(‘BornDate’) . “<br />” .
    “&nbsp; <b>Country</b>: “ . $friend->get(‘Country’) . “<br />” .
    “&nbsp; <b>Residential Country</b>: “ . $friend->get(‘ResidentialCountry’) . “<br />” .
    “&nbsp; <b>Residential City</b>: “ . $friend->get(‘ResidentialCity’) . “<br />” .
    “&nbsp; <b>Profession</b>: “ . $friend->get(‘Profession’) . “<br />” .
    “&nbsp; <b>Interests</b>: “ . $friend->get(‘Interests’) . “<br />” .
    “&nbsp; <b>About me</b>: “ . $friend->get(‘About’) . “<br />” .
    “&nbsp; <b>Favorite Movie</b>: “ . $friend->get(‘FavoriteMovie’) . “<br />” .
    “&nbsp; <b>Favorite Entertainent</b>: “ . $friend->get(‘FavoriteEntertainent’) . “<br />” .
    “&nbsp; <b>Favorite Drama</b>: “ . $friend->get(‘FavoriteDrama’) . “<br />” .
    “&nbsp; <b>Favorite Place</b>: “ . $friend->get(‘FavoritePlace’) . “<br />” .
    “&nbsp; <b>Favorite Food</b>: “ . $friend->get(‘FavoriteFood’) . “<br />” .
    “&nbsp; <b>Photo URL</b>: “ . $friend->get(‘Photo’) . “<br /><br />”;
}
?>


© 2007-2010 El blog de ERiDeM. Free wordpress themes.