News for hackers. Stuff that matters.

adamdoupe

If you want to learn offensive security skills, particularly binary analysis, I highly recommend https://pwn.college

It's a hands-on class that takes you through interacting with programs, to reverse engineering and memory corruption, all the way to race conditions and kernel exploitation.

Created by @Zardus and run also as a class at ASU.

Re:CERN day 1: rebuilding the first web browser on Tuesday February 12, 2019 @01:17PM (#19145996)
I posted this on the blog but thought I post here too.

Last year I set up a WorldWideWeb.app (version 0.15) running in the Previous emulator on Ubuntu for a CTF challenge for DEF CON 2018 Quals (they had to exploit a buffer overflow in HTTP.c). There's a lot of other cruft around to set up and automate the challenge and getting input to WWW, but there's Vagrant and ansible scripts to set up and run everything.

There's a lot of work to set up networking in NextStep and getting all the pieces right (I think I even set up an SSH server running on NextStep).

The source is all here: https://github.com/o-o-overflow/chall-www

I'd be happy to help, I love this idea of software archeology/preservation.

Context here means the context of the output page.

Usually this means the HTML context. Different sanitization is needed depending on _where_ in the HTML document the input is used.

For instance, if the input is used in between HTML tags (let's say $foo is user input in this PHP example):

    ... <body><?php echo $foo ?></body>
Here, the input that you need to transition to JavaScript execution is a < character (among other things): <script>alert(1)</script>.

Therefore, to correctly sanitize this, you would call the PHP `htmlentities` function:

    ... <body><?php echo htmlentities($foo) ?></body>
Now, this XSS vulnerability is fixed.

What if foo is used in a different context?

    ... <body><a href='<?php echo htmlentities($foo) ?>'>...
Here, what we need to transition the HTML parser to executing JavaScript is a ' character, and this can be exploited by the following input (in between the double quotes): "' onclick='alert(1)"

The key problem is that `htmlentities` is not valid sanitization in the context of an HTML attribute value. In this example, you need to use `urlencode`

    ... <body><a href='<?php echo urlencode($foo) ?>'>...
The general idea also applies to CSS, JSON, and JavaScript. SQL is a different vulnerability class (SQL injection).

I highly recommend the following research paper from 2011 that discusses the context-sensitivity of JavaScript in depth: http://www.comp.nus.edu.sg/~prateeks/papers/scriptgard-ccs11...

In my mind, the context-sensitivity of XSS is one of the key reasons why it is so prevalent.

Re:Why I care about Firefox OS fading away on Wednesday January 27, 2016 @09:25AM (#10980101)
In our study we didn't differentiate (from a security perspective, if you are vulnerable because you use a WebView when showing ads, then you are still vulnerable), so I don't have data for that.

It would be interesting data, although determining WebView for ads statically might be tricky.

Re:Why I care about Firefox OS fading away on Tuesday January 26, 2016 @11:46PM (#10978268)
Sure! The short version is that I don't know.

We were looking for instances of insecure WebView usage, so from a security perspective small piece vs. entire app doesn't matter too much (and is difficult to measure, especially when looking at 1.1M apps).

However, some of the other numbers from our analysis can be useful to draw a picture of WebView usage.

We statically looked for uses of WebView, and 85% of the 1.1M apps used a WebView.

Of those 998,286 apps:

- 97% enable JavaScript (which is off by default)

- 36% use the JavaScript Bridge Interface (which is a fairly good indicator of heavy WebView usage)

- 94% implement a shouldOverrideUrlLoading method of the WebView (another good indicator that the developer is using the WebView for something non-trivial)

- 27% implement an onReceivedSslError method of the WebView (indication that the developer is using the WebView for something non-trivial). (Sadly, 29% of the apps that implement onReceivedSslError intentionally IGNORE all SSL errors.)

So I guess the takeaway is that 85% is an upper bound, the real number of WebView-only apps is absolutely lower, however it's clear that WebViews are significantly used in mobile apps.

Re:Why I care about Firefox OS fading away on Tuesday January 26, 2016 @07:59PM (#10977496)
We've studied this and found that ~85% of the free apps on the Google Play store use a WebView (I like the term "mobile web app"): http://adamdoupe.com/publications/large-scale-study-of-mobil...
Re:A Career in Science Will Cost You Your Firstborn on Friday January 09, 2015 @12:58PM (#8863338)
Most professor salaries are on 9-month appointments, for the academic year. The three summer months usually come from grants, teaching summer sessions, or consulting.

However, a professor can choose to spend the grant money on student support rather than summer salary (thus forgoing their own salary), which is what I assume the author is referring to.

Re:CSRF in Doorkeeper OAuth2 gem on Wednesday December 17, 2014 @10:53AM (#8762689)
No. Check out the example in the article, an attacker can make your browser submit a form with a POST request using JavaScript.

It's slightly harder to exploit, as the attacker can't just send you a link to facebook.com, but they can send you a link to example.com which has the form and uses JavaScript to submit the form.

Re:Path uploads your entire iPhone address book to its servers on Tuesday February 07, 2012 @04:45PM (#3563765)
As I remember, the analysis doesn't handle calls that can't be determined statically.

So the analysis would fail to determine the method and class of a obfuscated string.

Re:Path uploads your entire iPhone address book to its servers on Tuesday February 07, 2012 @04:10PM (#3563645)
A postdoc in my lab published an academic paper that did exactly this: automated static analysis of iOS compiled binaries for privacy violations.

As far as I know Apple was not interested.

Here's the paper if you want to take a look: http://seclab.cs.ucsb.edu/media/uploads/papers/egele-ndss11....

Re:MIT develops new tool that can interrupt infinite loops on Tuesday August 02, 2011 @09:46PM (#2839493)
Link to the full paper for those interested: http://people.csail.mit.edu/rinard/paper/ecoop11.pdf
Re:LSD: The Geek's Wonder Drug on Friday April 29, 2011 @06:30PM (#2499245)
I've found that it's not the actual code review that's helpful, but preparing for a code review. It forces you to describe the code clearly, which often makes the code clearer in the process. Plus you try to anticipate the comments your co-workers will give.
Re:Botnet uses Twitter for Drive-by-Download Attacks on Thursday April 30, 2009 @08:12PM (#587806)
Hey guys, this is some research that some guys in my lab have been doing.

Pretty cool stuff, they "took over" the Torpig botnet. Lots of interesting stuff, the paper on the link gives a good overview of some of the things they discovered.

Love to hear your thoughts!

Re:Ask HN: How much do you exercise a day/week? on Monday April 20, 2009 @12:18AM (#570197)
> if you're looking for motivation, i highly suggest finding some sport that you enjoy doing. go looking for it, i'm sure one exists.

This is exactly what I've done. Rock climbing at a local gym 3 times a week. I also run 3.5 miles 2 times a week but only for the added fitness.

I really enjoy rock climbing; it's an excellent combination of physical fitness and problem solving.

Re:6 Months of free DropBox Pro on Monday April 06, 2009 @08:39PM (#550002)
This is the way I use dropbox. I even created a script to install all of my packages and create the proper symlinks. Makes setting up a new computer (frequent occurrence with VM's) super simple.

Dropbox rocks!

Re:Ask HN: Review my startup on Tuesday November 25, 2008 @03:12PM (#376724)
The featured five on the homepage moves way too fast. It switched when I was still reading.

Beyond that, interesting site. Good luck!

Re:Ask HN: Review my startup on Monday November 24, 2008 @06:49PM (#375675)
On Firefox 1.5 on Linux (It's what they make us use at school), the "points or pay" text extends beyond the tab.

http://tinypic.com/view.php?pic=20k3o0z&s=4

But beyond that, I agree with the comments so far, excellent design and I wish you the best of luck.

Re:New Recommendation System = 40 Percent More Diggs on Thursday July 31, 2008 @06:22PM (#263527)
Can anybody who still uses Digg comment on if this makes Digg worthwhile again (or at least not a waste of time)?
Re:Generate music from your voice on Monday March 03, 2008 @09:49PM (#128535)
By singing?

Actually this was really cool and would be fun to play with.

Re:Ask YC: Any of you use Dvorak? on Friday February 29, 2008 @05:41PM (#126386)
Steve Yegge's post "Effective Emacs" has instructions for how to do this, plus some other emacs tips: http://steve.yegge.googlepages.com/effective-emacs
Re:Learning to Smoke on Friday February 22, 2008 @05:29PM (#121631)
I voted this up for two reasons:

1. The article was well written and presented a point of view that is not commonly presented.

2. When I was younger (teenage years I think), I had this crazy idea to start smoking in order to see if I had the resolve to quit. Never did though, cause I understood the adverse affects if I couldn't quit.

Re:Wootoff today on Friday February 15, 2008 @06:08PM (#116744)
Hey, I dunno if anyone is interested, but a year or so ago I create a site to get woot updates via Email or Text message.

Check it out at http://wootwatchers.com and let me know what you think.

Re:Emergency Elisp on Friday January 25, 2008 @01:30AM (#103978)
Keep drinking the Kool-Aid, I just started and it tastes wonderful...

For those interested, Steve Yegge has an old post on emacs productivity tips: http://steve.yegge.googlepages.com/effective-emacs

Re:Entrepreneur creates offline Ad blocker on Thursday December 20, 2007 @01:55PM (#91550)
This is extremely cool, (check out the video at the bottom), but I'd hardly consider the guy more of an artist than an entrepreneur, especially with this quote:

"an unauthorized, ongoing video-art performance collaboration with the New York City Metropolitan Transit Authority, Clear Channel Communications, and its selected artists."

Re:CMU professor gives his last lesson on life on Thursday September 20, 2007 @05:02PM (#57600)
"The Wall" by Jean-Paul Sartre deals with these issues. I read it in some BS French Lit class, but "The Wall" was one that stuck with me. I'd recommend reading it (no long at all) as it gives a good depiction of what it's like facing death secularly.
Re:Ask YC News: Voting up vs. up and down on Wednesday September 19, 2007 @04:24PM (#57044)
You've got it, but you can only downvote comments. And you can't downvote replies to your comment.

Older ยป