bob - Dave's Blog

Search
My timeline on Mastodon

Tweet from Bobak Ferdowsi

2016 Apr 22, 4:40
Hi, you may know me from space, but did you know Earth is my favorite planet? Love it & each other.
PermalinkComments

Retweet of oneunderscore__

2015 Oct 20, 5:52
Back to the Future II writer Bob Gale: Biff Tannen was based on Donald Trump. No joke. http://www.thedailybeast.com/articles/2015/10/21/how-back-to-the-future-predicted-trump.html … pic.twitter.com/kGvrFxhxxc
PermalinkComments

The Making of Pulp Fiction: Quentin Tarantino’s and the Cast’s Retelling | Vanity Fair

2013 Feb 28, 3:03

The first independent film to gross more than $200 million, Pulp Fiction was a shot of adrenaline to Hollywood’s heart, reviving John Travolta’s career, making stars of Samuel L. Jackson and Uma Thurman, and turning Bob and Harvey Weinstein into giants. How did Quentin Tarantino, a high-school dropout and former video-store clerk, change the face of modern cinema? Mark Seal takes the director, his producers, and his cast back in time, to 1993.

PermalinkCommentsarticle movie film interview pulp-fiction

Stripe CTF - SQL injections (Levels 0 & 3)

2012 Sep 5, 9:10

Stripe's web security CTF's level 0 and level 3 had SQL injection solutions described below.

Level 0

Code

app.get('/*', function(req, res) {
var namespace = req.param('namespace');

if (namespace) {
var query = 'SELECT * FROM secrets WHERE key LIKE ? || ".%"';
db.all(query, namespace, function(err, secrets) {

Issue

There's no input validation on the namespace parameter and it is injected into the SQL query with no encoding applied. This means you can use the '%' character as the namespace which is the wildcard character matching all secrets.

Notes

Code review red flag was using strings to query the database. Additional levels made this harder to exploit by using an API with objects to construct a query rather than strings and by running a query that only returned a single row, only ran a single command, and didn't just dump out the results of the query to the caller.

Level 3

Code

@app.route('/login', methods=['POST'])
def login():
username = flask.request.form.get('username')
password = flask.request.form.get('password')

if not username:
return "Must provide username\n"

if not password:
return "Must provide password\n"

conn = sqlite3.connect(os.path.join(data_dir, 'users.db'))
cursor = conn.cursor()

query = """SELECT id, password_hash, salt FROM users
WHERE username = '{0}' LIMIT 1""".format(username)
cursor.execute(query)

res = cursor.fetchone()
if not res:
return "There's no such user {0}!\n".format(username)
user_id, password_hash, salt = res

calculated_hash = hashlib.sha256(password + salt)
if calculated_hash.hexdigest() != password_hash:
return "That's not the password for {0}!\n".format(username)

Issue

There's little input validation on username before it is used to constrcut a SQL query. There's no encoding applied when constructing the SQL query string which is used to, given a username, produce the hashed password and the associated salt. Accordingly one can make username a part of a SQL query command which ensures the original select returns nothing and provide a new SELECT via a UNION that returns some literal values for the hash and salt. For instance the following in blue is the query template and the red is the username injected SQL code:

SELECT id, password_hash, salt FROM users WHERE username = 'doesntexist' UNION SELECT id, ('5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8') AS password_hash, ('word') AS salt FROM users WHERE username = 'bob' LIMIT 1
In the above I've supplied my own salt and hash such that my salt (word) plus my password (pass) hashed produce the hash I provided above. Accordingly, by providing the above long and interesting looking username and password as 'pass' I can login as any user.

Notes

Code review red flag is again using strings to query the database. Although this level was made more difficult by using an API that returns only a single row and by using the execute method which only runs one command. I was forced to (as a SQL noob) learn the syntax of SELECT in order to figure out UNION and how to return my own literal values.

PermalinkCommentssecurity sql sql-injection technical web-security

“Hey Pass Me a Beer” in the same vein as the...

2012 Jun 21, 2:55


“Hey Pass Me a Beer” in the same vein as the HIGH-FIVE! montages.

PermalinkCommentshumor video beer

YouTube - TelltaleGames's Channel

2010 Oct 28, 10:41"In part one of our Back to the Future: The Game behind the scenes series, Bob Gale and Christopher Lloyd speak on their involvement and excitement on working with Telltale"PermalinkCommentsvideo videogame christopher-lloyd bttf backtothefuture

Never-before-seen footage of Eric Stoltz as Marty McFly in Back To The Future

2010 Oct 13, 3:11"To celebrate the 25th Anniversary of Back To The Future, we've got never-before-seen footage of original star Eric Stoltz as Marty McFly. Plus Robert Zemeckis, Steven Spielberg and Bob Gale all explaining why they replaced him with Michael J. Fox"PermalinkCommentsbacktothefuture bttf movie video eric-stoltz

Vanjamrgan's Gallery

2009 Nov 29, 1:53Fictional characters with beards. "Bearded: Brock Samson, Bearded: Robocop, Bearded: Hellboy, Bearded: Boba Fett, Bearded: Black Mage, Bearded: Wario, Bearded: Clint Eastwood, Bearded: Batman"
PermalinkCommentshumor art beard facial-hair hero brock-samson robocop batman boba-fett

Ceci n'est pas un Bob: The Zone of Essential Risk

2009 Jun 10, 12:17"Bruce pointed out in his return email that while the fraud pattern was a good match for escrow, the transaction size wasn't: since the item exchanged in the eBay transaction he highlighted was sold for only $500, the price of an escrow agent would have been hard to justify. He's right."PermalinkCommentsblog security economics article bruce-schneier Bob-Blakley ebay

Platonic Ideals in Anathem and The Atrocity Archives

2009 Apr 7, 11:58
The Atrocity ArchivesThe Jennifer MorgueAnathem

This past week I finished Anathem and despite the intimidating physical size of the book (difficult to take and read on the bus) I became very engrossed and was able to finish it in several orders of magnitude less time than what I spent on the Baroque Cycle. Whereas reading the Baroque Cycle you can imagine Neal Stephenson sifting through giant economic tomes (or at least that's where my mind went whenever the characters began to explain macro-economics to one another), in Anathem you can see Neal Stephenson staying up late pouring over philosophy of mathematics. When not exploring philosophy, Anathem has an appropriate amount of humor, love interests, nuclear bombs, etc. as you might hope from reading Snow Crash or Diamond Age. I thoroughly enjoyed Anathem.

On the topic of made up words: I get made up words for made up things, but there's already a name for cell-phone in English: its "cell-phone". The narrator notes that the book has been translated into English so I guess I'll blame the fictional translator. Anyway, I wasn't bothered by the made up words nearly as much as some folk. Its a good thing I'm long out of college because I can easily imagine confusing the names of actual concepts and people with those from the book, like Hemn space for Hamming distance. Towards the beginning, the description of slines and the post-post-apocalyptic setting reminded me briefly of Idiocracy.

Recently, I've been reading everything of Charles Stross that I can, including about a month ago, The Jennifer Morgue from the surprisingly awesome amalgamation genre of spy thriller and Lovecraft horror. Its the second in a series set in a universe in which magic exists as a form of mathematics and follows Bob Howard programmer/hacker, cube dweller, and begrudging spy who works for a government agency tasked to suppress this knowledge and protect the world from its use. For a taste, try a short story from the series that's freely available on Tor's website, Down on the Farm.

Coincidentally, both Anathem and the Bob Howard series take an interest in the world of Platonic ideals. In the case of Anathem (without spoiling anything) the universe of Platonic ideals, under a different name of course, is debated by the characters to be either just a concept or an actual separate universe and later becomes the underpinning of major events in the book. In the Bob Howard series, magic is applied mathematics that through particular proofs or computations awakens/disturbs/provokes unnamed horrors in the universe of Platonic ideals to produce some desired effect in Bob's universe.

PermalinkCommentsatrocity archives neal stephenson jennifer morgue plato bob howard anathem

Subterranean Press - Fiction: Missile Gap by Charles Stross

2009 Apr 6, 10:47"It's 1976 again. Abba are on the charts, the Cold War is in full swing - and the Earth is flat. It's been flat ever since the eve of the Cuban war of 1962; and the constellations overhead are all wrong. Beyond the Boreal ocean, strange new continents loom above tropical seas, offering a new start to colonists like newly-weds Maddy and Bob, and the hope of further glory to explorers like ex-cosmonaut Yuri Gagarin: but nobody knows why they exist, and outside the circle of exploration the universe is inexplicably warped."PermalinkCommentscharles-stross scifi read fiction free literature

MetLife Home Loans - Bobbi Moody

2009 Mar 22, 10:33Bobby Moody contact info.PermalinkCommentsbobbi-moody home home-loan

YouTube - Norm MacDonald - Bob Saget roast

2008 Aug 18, 4:06Norm MacDonald performs at the roast of Bob Saget. Must be viewed with context of entire roast in mind in which roasters spout profane offensive insult humor. Norm does a sort of un-roast consisting of jokes from the back of milk cartons or cracker jack boxes. Not at all offensive. Funny conceptually and of course since its Norm MacDonald its hilarious in practice. Later described by Jim Norton: "Watching your set, was like watching Henry Fonda pick blueberries."PermalinkCommentsnorm-macdonald bob-saget roast comedy-central humor video youtube

Vegas and New Year

2008 Jan 2, 8:57

Normal Sized Slot MachineTwo and half weeks ago Sarah and I went to Las Vegas where I got to see Jesse, Pat, Chris, and (briefly because he's some kind of big shot too busy for his friends now etc) Grib from college. They're mostly in San Jose and I hadn't seen them for a while so it was a lot of fun to hang out. We all stayed at the MGM which is a nice hotel with some good restaurants. In other Vegas related links, Sarah added Sarah's Las Vegas restaurant reviews to her reviews and Jesse has Jesse's Vegas photos up too.

Vegas DinnerSarah and I saw the Blue Man Group (video from a concert) and the Price is Right Live Show. The Blue Man Group was very cool although the music was all rock with a heavy drum focus (not depicted in the videos I linked) which I got a little tired of. But despite that I really enjoyed the show, very funny and I totally recommend it. The Price is Right Live Show is like the regular show on TV except the recording is not televised and its not hosted by Bob Barker or Drew Carey. So folks from the audience are still called up to play the same games and really win prizes. It was advertised as hosted by Todd Newton, B-list game show host, but was instead hosted by JD Roberto who hosted such things as "Reality Remix" and the show "Are You Hot? The Search for America's Sexiest People". The showcase showdown included the 2008 version of my car and thankfully I wasn't picked to compete for that because, well I don't know where they bought the car, but I would have gotten the price very wrong. We sat right next to the stage for that show and had a good time.

MGM Grand in Las VegasFor New Years Eve Sarah and I stayed in and watched the glitched Seattle Space Needle fireworks show from a safe distance. On New Years we went to a pot-luck at Todd's house and had a fun time. Todd's place is on the top of a hill and has a lovely view of Washington's snow-capped mountains.

PermalinkCommentsnewyear vegas lasvegas personal bluemangroup

Bob Bemer

2006 Mar 27, 11:06Bob Bemer - invetor of the back slashPermalinkCommentsbob-bemer ascii back-slash reverse-solidus escape escape-sequence y2k-problem
Older Entries Creative Commons License Some rights reserved.