A disturbing lack of taste. Just another WordPress site

2Mar/140

Boston Key Party CTF 2014 – Dante’s Inferno

The challenge give us the divine comedy in a txt file with obviously the flag hidden somewhere in it. So basically now we have only to 'diff' the original one with the one provided by the task. First we download the original one in english from: http://www.gutenberg.org/files/8800/8800-h/8800-h.htm and merge all the 3 parts (paradise,purgatory and hell) removing the footer and the header of each (copyrights, notes,etc..). Now with an automated script remove some garbage:

#!/usr/bin/perl
open(IMG,"<divine_original");
#open(IMG,"<divine_comedy.txt");
@f=<IMG>;
foreach $l(@f){
if($l=~/ENLARGE/ || $l=~/jpg/ || $l=~/^\s$/){
}else{
$l=~s/'//;
$l=~s/"//;
$l=~s/—/--/;
print $l;
}
}

Do both for the one you downloaded and the one that the task gave you.

Now run: diff --text --ignore-blank-lines -w divine_original_cleaned divine_given_cleaned

A quite long list of false positive will print out but if you look further you'll see a strange one:

< To whom I thus: It is enough: no fear,
< I see, lest nature in her part should tire.
---
> To whom I thus: What you are looking
> For is At least this one wasn't a VM'.

There is the flag: At least this one wasn't a VM .

Link of original cleaned comedy: /divine_original_cleaned.txt

Link of given comedy cleaned: /divine_given_cleanded.txt

Razor4x

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.