HNHacker News
TopNewBestAskShowJobs

nickcano

93 karma · joined January 6, 2015

submissionscomments
nickcano··on Over 30% of Official Images in Docker Hub Contain Security Vulnerabilities
So a structural engineer shouldn't worry about the structural integrity of his buildings, only that they stand up under ideal conditions? A car manufacturer shouldn't worry about crash-testing or other safety concerns, only that their car moves?

HOW DOES THAT MAKE ANY SENSE?!?!

Like it or not, we're stuck on Von Neumann architecture, and as a result, data can be treated as code and vice-versa. The consequence of this is that, under certain circumstances, data can be carefully crafted to act as code, and can be executed in an unforeseen context. As a software engineer, it is your job to take precautions when developing software. Precautions that prevent this execution. Security people do the best they can to make it easy to develop safely, but all of that is useless if the developers ignore it. And, because security vulnerabilities are a manipulation of context-and-program-specific control flow, there's not a way to encapsulate all security measures in a way that is transparent. It's just not possible. Only developers know the specifics of their software, and only developers can protect certain edge cases. If you assert otherwise, you have a fundamental misunderstanding of the systems that you work with, and you need to re-evaluate your education before continuing to work in the industry (assuming you do). This isn't an opinion. This is a fact.

Lastly, us "security experts" do contribute to our field. Security is one of the hard problems in computer science - far harder than whatever you're doing that lets you "not think about databases, deployment, testing, scaling" - and there's a lot of solutions that have been engineered to deal with software that has been created by people like you. There's static code analysis tools, which can detect bugs in code before it is even compiled. There's memory analyzers that can detect dozens of different classes of memory-related bugs by just watching your software run. There's memory allocators and garbage collectors that can prevent issues with use-after-free and other heap-related exploitation bugs at run-time. There's data execution prevention and buffer execution prevention that, at run-time, help prevent code from being executed from data pages. There's EMET and other real-time exploit detection tools that exist outside of your software and can still prevent exploitation. That's not even an exhaustive list. There are literally hundreds of tools out there that make finding and fixing security bugs easy, but those tools can't patch your code for you. That's why there are consultants, code auditors, and penetration-testers that can give advice on how to fix bugs, find bugs where automated tools fail, and even coach developers into writing more secure code; because having smart, security aware developers is one of the major ways to defend against security bugs.

nickcano··on Over 30% of Official Images in Docker Hub Contain Security Vulnerabilities
Security Guy: Hey, bank, it seems like your vault is accessible via some old sewage tunnels.

Bank: So what? Nobody knows about those tunnels.

Security Guy: But someone who finds them, like me, but with less morals, could rob you.

Bank: Prove it. Rob the vault.

Security Guy: ..... ?

Finding a vulnerability isn't the same thing as exploiting one, and a lack of exploitation doesn't imply a lack of vulnerability. You also have to consider that a small portion of vulnerabilities are actually exploitable, but it's a very hard problem to find out which ones are and which ones aren't. Exploiting a single vulnerability is typically harder, in fact, than patching a dozen of them (for example, you can easily start using a secure version of strcpy(), but exploiting it requires an attacker to smash the stack or ROP their way into full execution).

The bottom line is that you're not only naive if you believe what you just said, but you're doing a huge disservice to anybody who uses any code that you may write.

nickcano··on What Good Are C, C++, and Java?
Are you sour because you don't understand pointers, or something? I'm 22 and I almost exclusively use C++, C, and x86 assembly. These types of languages are not going anywhere, and a fair portion "the next generation of programmers" is perfectly fine with that.
nickcano··on “I'm wiping this repository away”
It really, really doesn't matter. WhatsApp has the money to manipulate the law however they want. Small-time developers do not. I came up as an engineer in the bot development industry (for online games), and the history of the industry proves this. Historically, game companies like Blizzard[1][2] and Jagex[3] have managed to win multi-million dollar lawsuits against small bot developers, citing intellectual property laws; even though the defendants only ever created custom clients or injected code into clients with the permission of the players using them.

If gaming companies are able to use such absurd interpretations of IP law to win $7 million judgments against people who modify clients in-memory on end-user machines, then I'm sure a company with the capital of WhatsApp can destroy any open source developer that they want to.

[1]http://en.wikipedia.org/wiki/MDY_Industries,_LLC_v._Blizzard....

[2]http://legal.ceilingfansoftware.com/

[3]http://services.runescape.com/m=news/g=runescape/jagex-vs-ib...

nickcano··on Dropbox accesses all the files in your PC?
Well, it's not 'scanning files'. It's scanning meta-data about directories and files.

You can see three calls for each file in the ProcMon logs:

1. CreateFile

2. QueryBasicInformationFile

3. CloseFile

Let's go through these in order:

1. Opens a handle to the file, allowing the application to query meta information, read, and write

2. Queries meta information about the file.

3. Closes the handle to the file before doing anything else, including reading data.

There's no scanning of files, because no data is read. Its common for applications to traverse directories like this, and the behavior could even be a consequence of a file system library or API that dropbox is using. If you think of your file system as a filing cabinet, what DropBox is doing might be equivalent to opening every drawer looking for a single file.

ProcMon detects CreateFile and QueryInformationFile using these function codes:

https://msdn.microsoft.com/en-us/library/ff548630(v=vs.85).a...

https://msdn.microsoft.com/en-us/library/ff549283.aspx

As you can see, neither of these indicates a file being read. It also monitors a number of other codes (I'm not sure how specifically it detects CloseFile), including this one, which is triggered when data is read from a file:

https://msdn.microsoft.com/en-us/library/ff549327(v=vs.85).a...

If that was being called, ProcMon would show it, but it doesn't

nickcano··on Most Down-Voted Stack Overflow Questions
I liked this idea, but noticed the gap between up/down votes was actually quite large, meaning the questions weren't actually that controversial. I went ahead and made a change that filtered out results where ABS(up - down) is less than half of MAX(up, down). (its quite a bit messier than that, though, as there's no MAX function in sql that selects the greater of two operands).

http://data.stackexchange.com/stackoverflow/query/282007/mos...

nickcano··on Show HN: Run SSH and HTTP(S) on the same port
Establishing a connection isn't considered 'sending a message'.
nickcano··on Those making $1,000+/month on side projects – what did you make?
I made a fully autonomous bot for a 15 year old MMORPG. The bot can completely play the game with very little intervention, and I have about 2,000 people paying $5.75 monthly for it.
← PreviousPage 2 of 2