Author Topic: Need help to crack a PGP encrypted file  (Read 3833 times)

0 Members and 1 Guest are viewing this topic.

Offline Raavgo

  • Peasant
  • *
  • Posts: 88
  • Cookies: 12
  • On my way from a n00b to a PRO
    • View Profile
Need help to crack a PGP encrypted file
« on: May 28, 2013, 02:58:03 pm »
Hello Ez,
To practice my hacking skill I am doing Hacker challenges.
The challenge I will ask you about, gave me a headache for about 3 days now.
I've been googling and thinking about it a lot.
So here it comes:

Challenge Description

Decrypt the PGP file: secretmusic.mp3.asc
Complete your task! (you will find out)

My Questions are:
  • How do I decrypt a PGP file (Brute Force?, Rainbow Tables?)
  • Do I need to code my own program for the decryption?
If you have some, I would love to get some good Tips.
have a nice day Raavgo


Offline str0be

  • Serf
  • *
  • Posts: 42
  • Cookies: 8
  • <!-- hi
    • View Profile
Re: Need help to crack a PGP encrypted file
« Reply #1 on: May 29, 2013, 12:19:25 pm »
Is it this challenge -> https://www.hacking-lab.com/cases/7039-music-hero/index.html ?

You aren't going crack pgp itself. That leaves only the other options. I'm not a member of hacking-lab but I managed to get the tarball of the challenge. I was thinking maybe that playing a game of Music Hero with the provided music would reveal the passphrase. Instead of playing I decided to try and brute-force the score. Here's the script for interests sake:

Code: [Select]
#!/bin/sh

# I'm guessing this can be solved by brute-forcing the perfect score
# that you would obtain by playing the provided mp3 in a game of Music Hero.

SCORE=0
LIMIT=$1

while [ $SCORE -ne $LIMIT ]; do
    gpg --no-tty                        \
        --homedir .gnupg/               \
        --passphrase $SCORE             \
        --output secret.mp3             \
        --decrypt secretmusic.mp3.asc > /dev/null 2>&1

    if [ $? -eq 0 ]; then
        echo "KEY FOUND: $SCORE"
        exit
    fi

    SCORE=$(( $SCORE + 1 ))

    if [ $(( $SCORE % 1000 )) -eq 0 ]; then
        echo -n "$SCORE..."
    fi

done

echo "Limit reached, giving up."

After trying roughly 1.7 million scores so far, I haven't found a match. Maybe the score isn't the answer? Can you provide any more info? Also, I'm a complete noob to gpg/pgp so I could be missing something obvious with that script...
« Last Edit: May 29, 2013, 12:22:03 pm by str0be »

Offline Raavgo

  • Peasant
  • *
  • Posts: 88
  • Cookies: 12
  • On my way from a n00b to a PRO
    • View Profile
Re: Need help to crack a PGP encrypted file
« Reply #2 on: May 30, 2013, 04:59:17 pm »
Yeah its that challenge.
I've thought about a dictionary attack or maybe a brute force attack via GPU.
I don't really have more information than the given things :(


Offline str0be

  • Serf
  • *
  • Posts: 42
  • Cookies: 8
  • <!-- hi
    • View Profile
Re: Need help to crack a PGP encrypted file
« Reply #3 on: May 30, 2013, 07:13:15 pm »
I don't think blind brute-force will work. I only tried the game score because it mentioned Music Hero and provided music files you can play with. I gave up after 2 million, though.

Offline Raavgo

  • Peasant
  • *
  • Posts: 88
  • Cookies: 12
  • On my way from a n00b to a PRO
    • View Profile
Re: Need help to crack a PGP encrypted file
« Reply #4 on: May 30, 2013, 10:08:37 pm »
Well thats why I thought a word list would be good but still I will keep the brute force idea in my mind maybe it is a easy password.. Who knows  ;)