511 karma · joined Sep 8, 2014 (12y ago) · 99 submissions
[ my public key: https://keybase.io/ej; my proof: https://keybase.io/ej/sigs/C3HkPc4k5SISC7AK-sWYBiQ6q08dOW-MVrdoWl16x_4 ]
comment 11y ago · link · parent
The next way I did it was with Vim replaces. There might be sexier ways of doing this?
1) A big replace to get rid of all the junk.
%s/\%Vemail.*creditcard/creditcard/g
2) A big replace to fix nulls in the credit card %s/\%V.*creditcard.*null.*//g
Then I could either change my code to not check for nulls or keep cleaning up this data until I have a CSV.This Vim flow is the exact thing I do every week or two at work when building the Chrome HSTS preload list into our product. Anyone know the sexier ways to make this really really fun?
I should note to those not super familiar with vim that may try this, my vim commands are over a visual block (the json string), since this was in the same file as my code.
comment 11y ago · link · parent
Seems to me if someone writes bad code when they SHOULD be writing good code, code-shaming might be in order.
I'm all for being nice and understanding. Everyone programs at a different level and I may not write code that is as good as I think, but some code is just obviously bad...and constructive criticism (if willing to be accepted) might help
comment 11y ago · link · parent
In order to encrypt the values in the session, rather than just encode you have to do a NewCookieStore([]byte("HMACKey"), []byte("CipherKey")) instead of a NewCookieStore([]byte("HMACKey")). I guess to answer your question, separate keys.
https://gist.github.com/steakejjs/6c17f07c4ca72115bfec
Here's a gist that shows a regular session, created with NewSessionStore([]byte("something-very-secret")) having the value's inside recovered easily.
The strings "foo" and "bar" are pretty easy to spot in the base64 output
comment 11y ago · link · parent
The big take-aways from my talk. Go doesn't have a lot of unsafe functions.
HTMLTemplates package and exec package are very resistant to common web attacks, so much so that I had trouble writing vulnerable code to XSS and RCE
As for the tool that attacks Gorilla Sessions, I found a lot of people on github who were not initializing their session securely. Most people in the first 30 pages of github search were doing it wrong. This is most likely a pretty widespread issue. It seems they didn't realize this was an AES key...The blog post is not completely correct saying it will be used for an HMAC. It will...but it is also used as an AES key.
comment 11y ago · link · parent
Brushing up on:
K&R - The C Programming Language
K&P - The Unix Programming Environment
K&P - The Practice of Programming
Kerrisk - The Linux Programming Interface (Not light reading)
Even though it is mostly review, reading code and seeing commands that K&R&P run has actually helped my workflow, code quality, etc.
Highly recommend re-reading if it has been a while. Even things like variable names have noticeably improved since beginning re-reading.
And, the Linux Programming Interface....is huge. There's always more to learn in there.
comment 11y ago · link · parent
This seems to me a bit like when you do a maze starting from the finish and it is, for whatever reason, trivial to go from one end to the other.
It is neat that it is 2015 and fuzzers are cool again, though.
comment 11y ago · link · parent
HHVM + HACK + XHP is an entirely different experience compared to writing PHP. Code can actually be very clean and lots of bugs can be found that may have previously gone unnoticed + performance benefits.
Just wanted to say FB is doing an exceptional job with these projects.
comment 11y ago · link · parent
An attacker can attempt phishing with HTML/JS injection on a HTTP page but an attacker cannot get a user to be looking at Amazon's real login page over http.
I think the problem here is the term ``SSL stripping'' was used and it may be kind unclear what MITM attacks is actually encompassed by it.
The OP wrote ``An attacker can easily steal passwords with SSL Stripping''. If OP meant he can easily steal passwords by basically a s/https/http on all urls on the page, OP's wrong. The attacker needs to create their own fake login page, present it to the victim, and hope the victim falls for it
comment 11y ago · link · parent
Many sites have multiple tiers of authentication. For example viewing items to purchase is over HTTP but to actually checkout or manage your account requires you to go to HTTPS and reauthenticate on an HTTPS login page. Always. After this you are kept on HTTPS for the trusted actions. Amazon only does shopping over http but trusted actions are all HTTPS.
This has been amazons authentication scheme for years and it is actually the same as googles (where Google does have http assets, they force a reauth before going to https only stuff).
The most an attacker could do is inject code on http pages, annoyingly add things to cart, purchase items with 1 click purchase (inject javascript that clicks the button) and eavesdrop on all items purchased (quite serious).
BUT they cannot perform SSL stripping if Amazon doesn't do any auth over HTTP. An attacker could do some phishing like attacks to try to convince the user to put their password in at the wrong time, though.
comment 11y ago · link · parent
The coolest thing to me about Tesla is the car is becoming decoupled from what powers the car. It's still electricity but if my power provider was to switch to nuclear, solar, people on bicycles, or coal It would be transparent to me.
comment 11y ago · link · parent
After hashing the password he is storing the hash along with the users random salt, not retroactively applying the salt a second time.
comment 11y ago · link · parent
This also isn't internet shattering, or whatever. Maybe it's just me but I expect a little more from all the talk about this bug.
comment 11y ago · link · parent
Does anyone remember this evening as a day of large outages? I wasn't able to experience the event as an internet user having lost power. This is the type of event I would EXPECT to get a big magnitude.
[1]http://en.wikipedia.org/wiki/June_2012_North_American_derech...
comment 11y ago · link · parent
I've actually found its much nicer using this in my projects than using a font cdn or self hosting woff files.
I do like the minimalism of css rules to creating this font as opposed to having a giant data section. It's pretty neat
comment 11y ago · link · parent
Browser extensions have a lot of abilities. People install browser extensions with no idea what they actually do, when content scripts in chrome extensions can scrape all your data on all sites you visit. There is no way to whitelist extensions to only some URLs and blacklist them from others.
If the browser is an OS, extensions have A LOT of abilities to avoid SAMEORIGIN policy, skirt CSP rules, and much much more.
Bottom line, if your browser is an OS, extensions can be malicious just like regular software.....whether or not you have NPAPI support or whatever else.
comment 11y ago · link · parent
Having competed in the CCDC for 6 years in college, I found it pretty insane when I saw that employers don't use real hardware during interviews.
Looks like I picked the wrong side project now this team is working on it. However, interviews are broken enough that there is plenty of room in the space =]. Can't wait to see what you launch.
comment 11y ago · link · parent
SHA3, Rabbit, and whatever EvpKDF does, I don't actually have time to look at that.