Link

International Law in Cyberspace: The Koh Speech and Tallinn Manual Juxtaposed

By Michael N. Schmitt

http://www.harvardilj.org/2012/12/online-articles-online_54_schmitt/

May 04 2013

Kippo SSH Honeypot Series

Edgis Security has created a 4-part guide on Kippo SSH honeypot. Their last post is dedicated to Kippo-Graph!

Kippo SSH Honeypot Series

  • Part 01: Getting Started
  • Part 02: User & Password Management
  • Part 03: A Sticky Honeypot
  • Part 04: Kippo-Graph

Apr 24 2013

Ανάλυση πακέτων, μέρος 1

Οι ακαδημαϊκοί έχουν ένα ρητό: Data don’t lie. Ε, λοιπόν, ένα παρόμοιο ρητό έχουν και οι ειδικοί ασφαλείας: Packets don’t lie. Αν κατανοήσετε αυτή την αλήθεια και μάθετε να την αξιοποιείτε, αν μη τι άλλο θα μάθετε να αντιμετωπίζετε ύπουλα προβλήματα ή να εντοπίζετε κακόβουλους χρήστες. Θέλετε να καταλάβετε τι εννοούμε; Καθίστε αναπαυτικά και συνεχίστε την ανάγνωση…

deltaHacker 019 (τεύχος Απριλίου 2013) | Ανάλυση πακέτων, μέρος 1

Τι πηγαίνει στραβά με το δίκτυο; Αν ξέρατε πόσες φορές έχει προκύψει αυτή η ερώτηση στα μυαλά χιλιάδων διαχειριστών συστημάτων ανά τον κόσμο… Η αλήθεια είναι ότι σ’ ένα δίκτυο υπάρχουν πολλά πράγματα που μπορούν να πάνε στραβά και πολλές φορές είναι αδύνατο να αντιληφθούμε τι ακριβώς προκαλεί το πρόβλημα. Αντί να φιλοσοφούμε ή να πιθανολογούμε για το τι πηγαίνει στραβά, είναι πολύ προτιμότερο να αναζητήσουμε τα αίτια στην πηγή. Μ’ αυτό δεν εννοούμε τον router ή κάποια άλλα συσκευή αλλά τα δικτυακά πακέτα (network packets), που αποτελούν τους φορείς επικοινωνίας μεταξύ των δικτυακών συσκευών. Σε αυτό το άρθρο (όπως και στα επόμενα) θα ασχοληθούμε με την ανάλυση πακέτων ή αλλιώς packet analysis. Μια στιγμή, όμως! Πριν προσπαθήσετε να αναλύσετε τη λειτουργία ενός δικτύου, είναι απαραίτητο να γνωρίζετε πώς ακριβώς λειτουργεί. Γι’ αυτό το λόγο, αν σας λείπουν βασικές γνώσεις για τη λειτουργία των δικτύων, καλό θα ήταν να μελετήσετε πριν προχωρήσετε παρακάτω. Μια καλή ιδέα θα ήταν να διαβάσετε τα άρθρα της σειράς Πώς δουλεύουν τα δίκτυα. Όπως βλέπετε έχουμε φροντίσει για όλα — γι’ αυτό άλλωστε μας αγαπάτε ;)

Ανάλυση Πακέτων
Η ανάλυση πακέτων (packet analysis) αποτελεί τη διαδικασία κατά την οποία “ακούμε” και καταγράφουμε τη ροή των πακέτων που διέρχονται από κάποιο network interface του υπολογιστή μας. Σκοπός μας είναι η ανάλυση τις καταγεγραμμένης ροής πακέτων, για να αντιληφθούμε τι συμβαίνει στο δίκτυο. Η ανάλυση πακέτων μπορεί να βοηθήσει στα ακόλουθα ζητήματα…

Διαβάστε ολόκληρο το άρθρο στο deltaHacker 019 (τεύχος Απριλίου 2013).

Όλες τις πληροφορίες για τις συνδρομές στο deltaHacker, το μοναδικό μηνιαίο περιοδικό με θεματολογία ethical hacking, δίκτυα, ασφάλεια, προγραμματισμό και ηλεκτρονικά, θα τις βρείτε εδώ ακριβώς.

Το περιοδικό deltaHacker δεν κυκλοφορεί στα περίπτερα, στους αναγνώστες του αποστέλλεται ταχυδρομικώς και οι παραγγελίες γίνονται αποκλειστικά online, συμπληρώνοντας τη σχετική φόρμα.

Σημείωση: Οι συνδρομές μπορούν να ξεκινούν από όποιο τεύχος επιθυμείτε, αρκεί να υπάρχει σε stock.

Video

Kippo N’ Bits N’ Bits

Video

Transforming Code into Beautiful, Idiomatic Python

Mar 23 2013

Yara: A Beginners’ Guide

Yara is a tool that helps us identify and classify malware software samples by the use of rules. We can use Yara to classify files or running processes to determine what family the malwares belong to.

To install Yara, we first need to download it and then issue the following command:

wget http://yara-project.googlecode.com/files/yara-1.6.tar.gz
tar xvzf yara-1.6.tar.gz
cd yara-1.6
./configure
make
sudo make install

Afterwards, we can use Yara by executing yara command, which by default will display it’s usage as shown below:

$ yara
usage:  yara [OPTION]... [RULEFILE]... FILE | PID
options:
  -t <tag>                  print rules tagged as <tag> and ignore the rest. Can be used more than once.
  -i <identifier>           print rules named <identifier> and ignore the rest. Can be used more than once.
  -n                        print only not satisfied rules (negate).
  -g                        print tags.
  -m                        print metadata.
  -s                        print matching strings.
  -l <number>               abort scanning after a <number> of rules matched.
  -d <identifier>=<value>   define external variable.
  -r                        recursively search directories.
  -f                        fast matching mode.
  -v                        show version information.
Report bugs to: <victor.alvarez@virustotal.com>

We can see that in order to run Yara, we need to supply the set of rules (RULEFILE) we want to apply and the path to the file (FILE) or pid (PID) of the process we want to scan.

The ClamAV Rules

We now need to get our hands on the rules file in order to use Yara. In the next section, I will describe the syntax used in the rules file, allowing you to create your own rules file. However, it’s far easier to use the ClamAV rules. The only problem with ClamAV rules is that we can’t actually use them directly with Yara, because Yara has its own way of describing them. This is where the script clamav_to_yara.py, written by Matthew Richard, comes into play. The script can automatically allow Yara to read the ClamAV rules. To do so, we have to clone the SVN repository of the Malware Analysis Cookbook which also includes the clamav_to_yara.py python script (direct link: https://code.google.com/p/malwarecookbook/source/browse/trunk/3/3/clamav_to_yara.py). The next step would then be to execute the following command:

$ python clamav_to_yara.py
###########################################################################
        Malware Analyst's Cookbook - ClamAV to YARA Converter 0.0.1
###########################################################################
Usage: clamav_to_yara.py [options]
Options:
  -h, --help            show this help message and exit
  -f FILENAME, --file=FILENAME
                        scanned FILENAME
  -o OUTFILE, --output-file=OUTFILE
                        output filename
  -v, --verbose         verbose
  -s SEARCH, --search=SEARCH
                        search filter
Usage: clamav_to_yara.py [options]
clamav_to_yara.py: error: You must supply a filename!

Next, we need to download the ClamAV main signature rules:

wget http://database.clamav.net/main.cvd
sigtool --unpack main.cvd

To convert the ClamAV signatures into the Yara form, we need to run the clamav_to_yara python script below:

python clamav_to_yara.py -f main.ndb -o test.yara

Now we can scan a directory with Yara and the new rules with the command below:

yara -r test.yara /opt/malware/

The PEiD Rules

We can also easily convert PEiD rules to Yara rules and use Yara to check which packer/encoder was used to compile the possibly malicious executable. This can be a great help in determining the used packer/encoder, which we can later use to decode the executable into its normal form again.

The PEiD signatures can be downloaded from Panda Security’s web site (direct link: http://research.pandasecurity.com/blogs/images/userdb.txt). To convert those rules to Yara rules, we can simply use the peid_to_yara.py python script, which can be downloaded from malwarecookbook as well (direct link: https://code.google.com/p/malwarecookbook/source/browse/trunk/3/4/peid_to_yara.py). We then do the conversion by executing the following command:

python peid_to_yara.py -f userdb.txt -o peid.yara

After the command is complete, Yara signatures will be contained in the peid.yara output file. Alternatively we can download the PEiD rules from the yara-project website. After that we can use the same yara command as shown above to check for any files encoded with the supported packer or encoder. To test whether this is true, we can take a binary file and pack it with the upx packer and then run the Yara command with the peid.yara rules to try to detect if the file was encoded with a known packer. In this case, the upx packer should be detected.

$ upx -1 -o malware_upx.exe malware.exe
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2010
UPX 3.07        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 08th 2010
        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    463152 ->    268592   57.99%    win32/pe     malware_upx.exe
Packed 1 file.

After that, we can run Yara with the PEiD rules to check if it can detect the packed executable. To do that, we need to issue the command below:

yara peid.yara malware_upx.exe
UPX malware_upx.exe

We can see that the malware_upx.exe file was detected as being encoded with the UPX encoder, which is correct. We could have also used the -r option with the Yara command to scan a whole directory, but this wasn’t necessary in our case, since we only wanted to prove that the Yara can now detect the malware_upx.exe as being packed with the UPX encoder.

After all this, we can classify malware examples using the Yara tool only, and we don’t need to scan them with ClamAV and PEiD anymore. This is true, because Yara contains the rules from ClamAV and PEiD that are used in the scanning process. If we run a honepot, we can now classify malware automatically only with the Yara software program. This is proving very useful when we quickly need a malware sample of a specified category. For more information on malware detection and analysis, InfoSec Institute offers reverse engineering training that’s loaded with everything you’ll need to know.

In this article we showed how we can use the Yara software product to use the ClamAV as well as PEiD rules to scan for malicious activity in the files. The above approach is based on signature verification only, which means that it isn’t hard to fool Yara (with the ClamAV and PEiD rules loaded) into thinking that the file is valid and thus not malicious. This is true because the signature verification process can only detect known malicious software, but if we write our own program or encode it with our own encoder, it will probably not be detected, since Yara doesn’t have the appropriate signatures loaded.

Nevertheless, using Yara to try to detect malicious activity in files is still beneficial, as most of the malware on the Internet are standard malicious files and not additionally obfuscated, so the majority of malicious files can be detected.

In order to prevent malware from infecting our system, we need to install at least one antivirus product. In Linux, we could use ClamAV or F-Prot, which is a free alternative for Linux users. But even with an antivirus installed, we can never be 100% secure, since a new undetectable virus can easily be written by a malicious user. The best way to protect the server is to use antivirus software to block known attacks, and to be on a constant alert for any new malware attacks that may not be detected.

Mar 22 2013

Ανάλυση malware, για όλους! [μέρος 3]

Στο προηγούμενο τεύχος δείξαμε αναλυτικά πώς πραγματοποιούμε μόνοι μας τη λεγόμενη δυναμική ανάλυση ενός δείγματος κακόβουλου λογισμικού. Για τις ανάγκες της εργασίας μας φτιάξαμε μια εικονική μηχανή–εργαστήριο, για τη φιλοξενία του κακόβουλου δείγματος. Σε αυτή την εικονική μηχανή προσθέσαμε κι όλα τα απαραίτητα εργαλεία, ενώ μετά είδαμε τον τρόπο χρήσης του καθενός. Η διαδικασία που γνωρίσαμε είναι σωστή και ιδιαίτερα χρήσιμη για να αποκτήσουμε γνώσεις σχετικά με τη δράση ενός κακόβουλου προγράμματος. Ελπίζουμε ότι μάθατε αρκετά πράγματα αλλά, όπως καταλαβαίνετε, το ζήτημα της ανάλυσης malware δεν τελειώνει εκεί!

deltaHacker 018 (τεύχος Μαρτίου 2013) | Ανάλυση malware, για όλους! [μέρος 3]

Καθώς στήναμε το εργαστήριο για τις δοκιμές, είναι πολύ πιθανό να σας δημιουργήθηκε το ακόλουθο ερώτημα: Ωραία όλα αυτά, αλλά τι γίνεται στην περίπτωση που αντί για τρία ή πέντε δείγματα malware, θέλουμε να αναλύσουμε τριακόσια ή πεντακόσια;

Δεν πιστεύουμε να νομίζετε ότι θα τα εξετάσουμε ένα προς ένα και… με το χέρι;! Κάτι τέτοιο θα μας έπαιρνε εβδομάδες ή ακόμη και μήνες. Ευτυχώς, όπως όλες οι διαδικασίες που εμφανίζουν μια περιοδικότητα και εκτελούνται σε υπολογιστή, έτσι και η ανάλυση malware μπορεί να αυτοματοποιηθεί. Αυτός ακριβώς ο αυτοματισμός θα αποτελέσει και το αντικείμενο του παρόντος άρθρου.

Διαβάστε ολόκληρο το άρθρο στο deltaHacker 018 (τεύχος Μαρτίου 2013).

Όλες τις πληροφορίες για τις συνδρομές στο deltaHacker, το μοναδικό μηνιαίο περιοδικό με θεματολογία ethical hacking, δίκτυα, ασφάλεια, προγραμματισμό και ηλεκτρονικά, θα τις βρείτε εδώ ακριβώς.

Το περιοδικό deltaHacker δεν κυκλοφορεί στα περίπτερα, στους αναγνώστες του αποστέλλεται ταχυδρομικώς και οι παραγγελίες γίνονται αποκλειστικά online, συμπληρώνοντας τη σχετική φόρμα.

Σημείωση: Οι συνδρομές μπορούν να ξεκινούν από όποιο τεύχος επιθυμείτε, αρκεί να υπάρχει σε stock.

Page 11 of 29« First...910111213...20...Last »