mid - Dave's Blog

Search
My timeline on Mastodon

Retweet of waxpancake

2015 Oct 29, 8:16
Starting at midnight, prepare for this Halloween's most terrifying horror game: TWITCH INSTALLS LINUX. https://www.twitchinstalls.com 
PermalinkComments

Retweet of reinpk

2015 Feb 1, 9:44
New blog post on software layers replacing middle management: http://rein.pk/replacing-middle-management-with-apis/ …
PermalinkComments

lunarcicadas: when did monsters that live under your bed start writing clickbait articles

2015 Jan 17, 4:05
Yandere Boyfriend LC @lunarcicadas :
when did monsters that live under your bed start writing clickbait articles pic.twitter.com/Fwsqh8gcBH
PermalinkComments

sharkfucker96: when did monsters that live under your bed start writing clickbait articles

2015 Jan 17, 4:05
Yandere Boyfriend LC @sharkfucker96 :
when did monsters that live under your bed start writing clickbait articles pic.twitter.com/Fwsqh8gcBH
PermalinkComments

Will Arnett Explains the Origins of His Arrested Development Chicken Dance

2013 May 8, 11:26

thebluthcompany:

To decide what Gob’s bad impression of a chicken might be, Arnett consulted on set in 2003 with series executive producers Mitch Hurwitz and James Vallely. They all tried out different versions for each other. “Jimmy started doing a little bit, then Mitch got up and did some, and then I began trying things,” remembers Arnett. “Picture three grown men hopping around, working out what it would be … They were pitching this really taunting dance, but I wanted to give it this very sharp, almost roosterlike, chest-sticking-out mannerism, like a real macho bravado dance.” And how did clapping get introduced to the move? “Because I wanted it to be only sort of threatening.”

Read More | Vulture

PermalinkCommentshumor chicken chicken-dance arrested-development

Stripe CTF - Level 8

2012 Dec 7, 2:07
Level 8 of the Stripe CTF is a password server that returns success: true if and only if the password provided matches the password stored directly via a RESTful API and optionally indirectly via a callback URI. The solution is side channel attack like a timing attack but with ports instead of time.

(I found this in my drafts folder and had intended to post a while ago.)

Code

    def nextServerCallback(self, data):
parsed_data = json.loads(data)
# Chunk was wrong!
if not parsed_data['success']:
# Defend against timing attacks
remaining_time = self.expectedRemainingTime()
self.log_info('Going to wait %s seconds before responding' %
remaining_time)
reactor.callLater(remaining_time, self.sendResult, False)
return

self.checkNext()

Issue

The password server breaks the target password into four pieces and stores each on a different server. When a password request is sent to the main server it makes requests to the sub-servers for each part of the password request. It does this in series and if any part fails, then it stops midway through. Password requests may also be made with corresponding URI callbacks and after the server decides on the password makes an HTTP request on the provided URI callbacks saying if the password was success: true or false.
A timing attack looks at how long it took for a password to be rejected and longer times could mean a longer prefix of the password was correct allowing for a directed brute force attack. Timing attacks are prevented in this case by code on the password server that attempts to wait the same amount of time, even if the first sub-server responds with false. However, the server uses sequential outgoing port numbers shared between the requests to the sub-servers and the callback URIs. Accordingly, we can examine the port numbers on our callback URIs to direct a brute force attack.
If the password provided is totally incorrect then the password server will contact one sub-server and then your callback URI. So if you see the remote server's port number go up by two when requesting your callback URI, you know the password is totally incorrect. If by three then you know the first fourth of the password is correct and the rest is incorrect. If by four then two fourths of the password is correct. If by five then four sub-servers were contacted so you need to rely on the actual content of the callback URI request of 'success: true' or 'false' since you can't tell from the port change if the password was totally correct or not.
The trick in the real world is false positives. The port numbers are sequential over the system, so if the password server is the only thing making outgoing requests then its port numbers will also be sequential, however other things on the system can interrupt this. This means that the password server could contact three sub-servers and normally you'd see the port number increase by four, but really it could increase by four or more because of other things running on the system. To counteract this I ran in cycles: brute forcing the first fourth of the password and removing any entry that gets a two port increase and keeping all others. Eventually I could remove all but the correct first fourth of the password. And so on for the next parts of the password.
I wrote my app to brute force this in Python. This was my first time writing Python code so it is not pretty.
PermalinkCommentsbrute-force password python side-channel technical web

Stripe CTF - XSS, CSRF (Levels 4 & 6)

2012 Sep 10, 4:43

Level 4 and level 6 of the Stripe CTF had solutions around XSS.

Level 4

Code

> Registered Users 

    <%@registered_users.each do |user| %>
    <%last_active = user[:last_active].strftime('%H:%M:%S UTC') %>
    <%if @trusts_me.include?(user[:username]) %>

  • <%= user[:username] %>
    (password: <%= user[:password] %>, last active <%= last_active %>)
  • Issue

    The level 4 web application lets you transfer karma to another user and in doing so you are also forced to expose your password to that user. The main user page displays a list of users who have transfered karma to you along with their password. The password is not HTML encoded so we can inject HTML into that user's browser. For instance, we could create an account with the following HTML as the password which will result in XSS with that HTML:

    
    
    This HTML runs script that uses jQuery to post to the transfer URI resulting in a transfer of karma from the attacked user to the attacker user, and also the attacked user's password.

    Notes

    Code review red flags in this case included lack of encoding when using user controlled content to create HTML content, storing passwords in plain text in the database, and displaying passwords generally. By design the web app shows users passwords which is a very bad idea.

    Level 6

    Code

    
    

    ...

    def self.safe_insert(table, key_values)
    key_values.each do |key, value|
    # Just in case people try to exfiltrate
    # level07-password-holder's password
    if value.kind_of?(String) &&
    (value.include?('"') || value.include?("'"))
    raise "Value has unsafe characters"
    end
    end

    conn[table].insert(key_values)
    end

    Issue

    This web app does a much better job than the level 4 app with HTML injection. They use encoding whenever creating HTML using user controlled data, however they don't use encoding when injecting JSON data into script (see post_data initialization above). This JSON data is the last five most recent messages sent on the app so we get to inject script directly. However, the system also ensures that no strings we write contains single or double quotes so we can't get out of the string in the JSON data directly. As it turns out, HTML lets you jump out of a script block using no matter where you are in script. For instance, in the middle of a value in some JSON data we can jump out of script. But we still want to run script, so we can jump right back in. So the frame so far for the message we're going to post is the following:

    
    
    
    
PermalinkCommentscsrf encoding html internet javascript percent-encoding script security stripe-ctf technical web xss

Alex takes a few steps

2012 Aug 16, 4:06
From: David Risney
Views: 75
0 ratings
Time: 00:43 More in People & Blogs
PermalinkCommentsvideo

Alex walking via walker

2012 Aug 6, 4:44
From: David Risney
Views: 69
0 ratings
Time: 00:53 More in People & Blogs
PermalinkCommentsvideo

Favorite Windows 8 Feature: Intra-Line Tab Completion

2012 May 9, 3:30

Fixed in Windows 8 is intra-line tab completion - you can try it out on the Windows 8 Consumer Preview now. If you open a command prompt, type a command, then move your cursor back into a token in the middle of the command and tab complete, the tab completion works on that whitespace delimited token and doesn't erase all text following the cursor. Like it does in pre Windows 8. And annoys the hell out of me. Yay!

PermalinkCommentscli technical windows cmd32.exe

How Bots Seized Control of My Pricing Strategy (bueno.org)

2012 Feb 22, 6:54

Automated authors writing books and automated middle men trying to sell over priced books at a profit. The author of the blog post claims to be human, but I’m not so sure.

PermalinkCommentshumor technical amazon economics bots

Alex tries baby food

2012 Jan 3, 12:02
Alex tries baby food for the first time.
From: David Risney
Views: 51
0 ratings
Time: 00:39 More in People & Blogs
PermalinkCommentsvideo

Man-in-the-Middle Attack Against SSL 3.0/TLS 1.0

2011 Sep 23, 4:37PermalinkCommentstechnical

Sleepy Alex

2011 Sep 10, 10:27
PermalinkCommentsvideo

Baby Room (Pre Baby)

2011 Aug 7, 2:22
PermalinkCommentsvideo

Conan O'Brien presents "The Legally Prohibited from Being Funny on Television Tour" | teamcoco.com

2010 Mar 11, 3:48Conan is doing a tour entitled "The Legally Prohibited from Being Funny on Television Tour". Coming to Seattle mid April...PermalinkCommentsconan-obrien humor tour

ASCIImeo, Videos in Text - peter nitsch.net

2010 Jan 18, 3:22"Today I finally launched ASCIImeo (asciimeo.com)...In a nutshell, it renders Vimeo videos in different textmode’s." Now if only it did the audio as midi. Try outPermalinkCommentsvideo ascii humor text

The Hierarchy Of Digital Distractions | Information Is Beautiful

2009 Sep 8, 7:29The food pyramid of digital distractions.PermalinkCommentshumor visualization information pyramid hierarchy distraction procrastination twitter facebook phone via:waxy

Cambridge Cop Accidentally Arrests Henry Louis Gates Again During White House Meeting | The Onion - America's Finest News Source

2009 Aug 4, 7:19"Witnesses said that Sgt. Crowley, failing to recognize Gates on their flight to Logan Airport, arrested the tenured professor in midair, once again at the baggage claim, and twice during their shared cab ride back to Cambridge"PermalinkCommentshumor onion politics

Where are you in the movie?

2009 May 5, 9:38"If we started a movie on the day you were born, and stretched it over your lifespan, this is where you'd be in that movie. So if you're a teenager, you might see Luke arguing with Uncle Owen, or Cameron making a phony phone call to Ed Rooney. If you're a retiree, you might see the Marshmallow Man, or Toto pulling away the curtain. And if you're in your mid-thirties, you might be relieved to know that Ferris is still eating lunch, and the Millenium Falcon hasn't left Tatooine."PermalinkCommentshumor clock calendar health movie
Older Entries Creative Commons License Some rights reserved.