TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-28-2009, 06:34 PM   #41 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by ioan1k View Post
Everyone give up on posting a challenge?

Here is a new one ...

Decrypt the following string

Code:
dc:f5:16:77:f2:b6:99:7b
:e4:fc:88:e2:c0:80:44:e8
:6d:26:3e:b5:d2:8e:1f:f5
:3e:f5:44:cf:6a:bd:f0:9e
:44:d0:6a:a0:24:3e:f4:d7
Hint ... the result is 32 bytes long

This is composed of a encrypting Hybrid algorithm using various encryption methods, I doubt that this is crackable (but that is the challenge)

Challenge Level: Advanced
Can you give us a example of a different string and what it looks like when encrypted?
__________________

Village Idiot is offline  
Reply With Quote
Old 09-28-2009, 06:35 PM   #42 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Challenge 7 Solution

Quote:
Originally Posted by Village Idiot View Post
Are you sure you encoded it right? It comes out as gibberish when converted to ascii or anything else.
Absolutely sure that it was encoded right. The hint (Base64) should've given a clue but I guess the string was not particularly clear once you had used base64_decode on it.

Here's a step-by-step that I just took because I had actually forgotten the original encoding method.

1. base64_decode the string. This gives the message Q-: 7 rtaryynup gnro V
Now here's the crunch, that initial set of three characters looks kind of like a smiley face (which usually comes at the end of a phrase) and the only capital letter (not in the smiley) is at the end of the message (yet capitals usually come at the beginning). So, reverse the message!
2. Use strrev to see what the message says in reverse, giving V orng punyyratr 7 :-Q. Ok, well if that's a sentence then it is gobbledygook (nonsense)! So it has a structure like a sentence but the letters are all messed up (but the non-letter smiley characters are ok, and 7 is the number of this challenge). So what mixes up letters yet leaves other characters intact... str_rot13!
3. Use str_rot13 on the message, to give I beat challenge 7 :-D
Aha, the message in all it's glory!

So the solution, would be very simply (though obviously arriving at that solution wasn't simple!):
PHP Code:
function challenge7($message) {
    return 
str_rot13(strrev(base64_decode($message)));
}

ob_start('challenge7'); 
// Hint: Base 64
echo '
  ============
  US 06ID cgcn
  R hcnl5bn Vw
  IGdu cm8 gVg
  ============
'
;
ob_end_flush(); 
Phew
Salathe is offline  
Reply With Quote
Old 09-28-2009, 06:38 PM   #43 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Salathe View Post
Challenge 7 Solution


Absolutely sure that it was encoded right. The hint (Base64) should've given a clue but I guess the string was not particularly clear once you had used base64_decode on it.

Here's a step-by-step that I just took because I had actually forgotten the original encoding method.

1. base64_decode the string. This gives the message Q-: 7 rtaryynup gnro V
Now here's the crunch, that initial set of three characters looks kind of like a smiley face (which usually comes at the end of a phrase) and the only capital letter (not in the smiley) is at the end of the message (yet capitals usually come at the beginning). So, reverse the message!
2. Use strrev to see what the message says in reverse, giving V orng punyyratr 7 :-Q. Ok, well if that's a sentence then it is gobbledygook (nonsense)! So it has a structure like a sentence but the letters are all messed up (but the non-letter smiley characters are ok, and 7 is the number of this challenge). So what mixes up letters yet leaves other characters intact... str_rot13!
3. Use str_rot13 on the message, to give I beat challenge 7
Aha, the message in all it's glory!

So the solution, would be very simply (though obviously arriving at that solution wasn't simple!):
PHP Code:
function challenge7($message) {
    return 
str_rot13(strrev(base64_decode($message)));
}

ob_start('challenge7'); 
// Hint: Base 64
echo '
  ============
  US 06ID cgcn
  R hcnl5bn Vw
  IGdu cm8 gVg
  ============
'
;
ob_end_flush(); 
Phew
It all makes sense now
__________________

Village Idiot is offline  
Reply With Quote
Old 09-28-2009, 06:59 PM   #44 (permalink)
The Contributor
 
ioan1k's Avatar
 
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
ioan1k is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
Can you give us a example of a different string and what it looks like when encrypted?
Yes I can :)

The original string is a Sha1 hash .... as should the first be, The hash is the hashed version of the key to a 1024 bit key used for a DH Secret Key

Encrypted String:
Code:
5b:37:91:43:ee:e6:22:7f
:ed:ed:c6:84:72:87:b6:55
:bb:32:b7:84:ca:ce:54:c8
:1d:4e:37:87:39:72:10:42
:2a:70:3c:02:b5:2f:91:26
Original
Code:
b3fa38c7c3cff8d2b0bc1fcd9a9e8b1a
Hint:

Hex
DES
48 Bytes

Good Luck :)

Update:

Added some hints... have fun 8)
__________________
My Portfolio - Work - Need freelance Work?
I've been developing 5 years now, and I learn something new everyday

Last edited by ioan1k : 09-28-2009 at 07:20 PM.
ioan1k is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Oriented Programming DizzyD General 2 02-25-2009 03:43 AM
how many programming languages do you know fluently? sarmenhb General 12 12-10-2008 06:26 AM
If a programming language was a boat… Wildhoney The Lounge 9 04-05-2008 07:24 AM
The speed of programming Devels General 1 02-01-2008 10:56 PM
12 common programming mistakes to avoid sunilbhatia79 General 0 11-16-2007 05:59 PM


All times are GMT. The time now is 12:43 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design