Dave's Blog

Search
My timeline on Mastodon

Ben Goldacre’s TED talk on publication bias, drug...

2012 Sep 28, 3:55


drug companies hiding the results of clinical trials.

(via I did a new talk at TED, on drug companies and hidden data.)

PermalinkCommentsscience video ted

NASA Rover Finds Old Streambed on Martian Surface (nasa.gov)

2012 Sep 27, 2:58PermalinkCommentsspace mars science nasa

Attention:!!!, Behold, you are reading a letter from your President Barack Obama.

2012 Sep 26, 2:43

Eric gets the most entertaining mail.

You have failed to comply with them after all the warning and instructions given to you, but since you are also among the terrorist we are facing in the country, I will personal make sure that I wipe away the crime in the state and I promise you that you will definitely pay with your life because I am here to protect the interest of my people and not to put them in shame, you suppose to support this government and not to spoil it.

PermalinkCommentshumor spam scam email eric-law

Nathan Barnatt makes awesome videos. This is a playlist of my...

2012 Sep 26, 2:21


Nathan Barnatt makes awesome videos. This is a playlist of my favorites of his. (via http://www.youtube.com/playlist?list=PLIjrVnNvXzb8N5tjV3fowJqYwuDM__WVf)

PermalinkCommentsNathan-barnatt video music dance humor

Kim Dotcom’s Megabox: Music service or malware? | Ars Technica

2012 Sep 26, 6:40

Megabox is an ad-replacer - replacing ads on the web as you browse with its own. Ignoring security concerns, I hope this doesn’t result in over prescriptive laws that endanger things like Greasemonkey.

To listen to songs through Megabox, users will have two options—purchasing the music through the service, or installing “Megakey” software onto their computer to listen for free. The Megakey software, as Dotcom explained to Torrentfreak, acts like ad-blocking software—except that it isn’t. Megakey allows most advertisements to appear, but replaces about 15 percent of the ads served up by websites with ads hosted by Megabox.

PermalinkCommentstechnical music ad mega megadotcom megabox

laughingsquid: hi-Call, A Bluetooth Handset Glove

2012 Sep 26, 6:24


laughingsquid:

hi-Call, A Bluetooth Handset Glove

PermalinkCommentshumor phone cell-phone blue-tooth video

The Lucille Bluth/Mitt Romney Tumblr confirms that saying awful rich person things is all about context

2012 Sep 24, 7:33

Mitt Romney quotes on screen shots of Lucille from Arrested Development works surprisingly well.

PermalinkCommentshumor arrested-development mitt-Romney politics

Developers claim Safari in iOS 6 breaks Web apps with aggressive caching

2012 Sep 22, 5:20

Go get them Eric!

PermalinkCommentshttp caching technical safari

laughingsquid: The Curious Government of the City of London...

2012 Sep 21, 6:10


laughingsquid:

The Curious Government of the City of London (not to be confused with London)

PermalinkCommentslondon politics history video humor

It is not just another Team Fortress 2 map. No.  It has a laser...

2012 Sep 21, 4:26


It is not just another Team Fortress 2 map. No.  It has a laser death cat.

THE GRIND (by Thecorp303)

PermalinkCommentshumor mod tf2 game video-game video

Patent Office tries “Stack Overflow for patents” to find prior art | Ars Technica

2012 Sep 20, 2:27

Welcome news. Glad to hear they’re looking for improvements.

… the USPTO has also worked with Stack Exchange, … to create a new site called Ask Patents. … Examiners or others looking for prior art can post questions about a specific application, and members of the general public can respond with evidence that an applicant was not the first to invent the subject matter of the application.

PermalinkCommentsip law patent stack-exchange technical uspto

laughingsquid: Photos: MakerBot Retail Store in Manhattan

2012 Sep 20, 2:14


laughingsquid:

Photos: MakerBot Retail Store in Manhattan

PermalinkComments3d-printer maker-bot retail

theatlantic: How the 8.5” x 11” Piece of Paper Got Its...

2012 Sep 19, 6:37


theatlantic:

How the 8.5” x 11” Piece of Paper Got Its Size

Why do we use a paper size that is so unfriendly for the basic task of reading? According to a very interesting post by Paul Stanley, the rough dimensions of office paper evolved to accommodate handwriting and typewriters with monospaced fonts, both of which rendered many fewer characters per line. “Typewriters,” he explains, “produced 10 or 12 characters per inch: so on (say) 8.5 inch wide paper, with 1 inch margins, you had 6.5 inches of type, giving … around 65 to 78 characters.” This, he says, is “pretty close to ideal.”

Read more. [Image: Picsfive/Shutterstock]

PermalinkCommentstechnical paper history

PIN number analysis

2012 Sep 19, 6:03

An analysis of leaked PIN numbers.

… nearly 11% of the 3.4 million passwords are 1234 !!!

PermalinkCommentspin security technical password

laughingsquid: Amp Tee, A Geeky T-Shirt Bringing Together Music...

2012 Sep 18, 2:37


laughingsquid:

Amp Tee, A Geeky T-Shirt Bringing Together Music And HTML Code

PermalinkCommentshumor html ampersand amp shirt t-shirt

New Deal With It

2012 Sep 17, 4:41

nickholmes:

Thanks Internet. 

PermalinkCommentshumor president new-deal

Ben Folds Five and Fraggle Rock “DO IT ANYWAY”...

2012 Sep 17, 3:22


Ben Folds Five and Fraggle Rock “DO IT ANYWAY” [Official Video] (by Nerdist)

PermalinkCommentsmusic video ben-folds-five muppets fraggle-rock chris-hardwick

laughingsquid: Goldfish Phone Booth Aquariums Installed in...

2012 Sep 14, 4:27


laughingsquid:

Goldfish Phone Booth Aquariums Installed in Japan by ‘Goldfish Club’

PermalinkCommentshumor fish gold-fish japan phone-booth

AbleGamers creates how-to accessibility guide for devs, publishers | Joystiq

2012 Sep 14, 4:20

A howto on making your video game accessible to those with disabilities (blind, color blind, deaf, etc)

The AbleGamers Foundation has created a 48-page document it hopes will serve as a how-to guide for game developers and publishers on how to create more accessible games. The in-depth guide by the disability non-profit covers in great detail how to make games available to those with varying degrees of mobility, hearing, visual and cognitive issues.

PermalinkCommentsgame technical video-game programming accessibility howto

Stripe CTF - Level 7

2012 Sep 13, 5:00

Level 7 of the Stripe CTF involved running a length extension attack on the level 7 server's custom crypto code.

Code

@app.route('/logs/')
@require_authentication
def logs(id):
rows = get_logs(id)
return render_template('logs.html', logs=rows)

...

def verify_signature(user_id, sig, raw_params):
# get secret token for user_id
try:
row = g.db.select_one('users', {'id': user_id})
except db.NotFound:
raise BadSignature('no such user_id')
secret = str(row['secret'])

h = hashlib.sha1()
h.update(secret + raw_params)
print 'computed signature', h.hexdigest(), 'for body', repr(raw_params)
if h.hexdigest() != sig:
raise BadSignature('signature does not match')
return True

Issue

The level 7 web app is a web API in which clients submit signed RESTful requests and some actions are restricted to particular clients. The goal is to view the response to one of the restricted actions. The first issue is that there is a logs path to display the previous requests for a user and although the logs path requires the client to be authenticatd, it doesn't restrict the logs you view to be for the user for which you are authenticated. So you can manually change the number in the '/logs/[#]' to '/logs/1' to view the logs for the user ID 1 who can make restricted requests. The level 7 web app can be exploited with replay attacks but you won't find in the logs any of the restricted requests we need to run for our goal. And we can't just modify the requests because they are signed.

However they are signed using their own custom signing code which can be exploited by a length extension attack. All Merkle–Damgård hash algorithms (which includes MD5, and SHA) have the property that if you hash data of the form (secret + data) where data is known and the length but not content of secret is known you can construct the hash for a new message (secret + data + padding + newdata) where newdata is whatever you like and padding is determined using newdata, data, and the length of secret. You can find a sha-padding.py script on VNSecurity blog that will tell you the new hash and padding per the above. With that I produced my new restricted request based on another user's previous request. The original request was the following.

count=10&lat=37.351&user_id=1&long=%2D119.827&waffle=eggo|sig:8dbd9dfa60ef3964b1ee0785a68760af8658048c
The new request with padding and my new content was the following.
count=10&lat=37.351&user_id=1&long=%2D119.827&waffle=eggo%80%02%28&waffle=liege|sig:8dbd9dfa60ef3964b1ee0785a68760af8658048c
My new data in the new request is able to overwrite the waffle parameter because their parser fills in a map without checking if the parameter existed previously.

Notes

Code review red flags included custom crypto looking code. However I am not a crypto expert and it was difficult for me to find the solution to this level.

PermalinkCommentshash internet length-extension security sha1 stripe-ctf technical web
Older Entries Creative Commons License Some rights reserved.