Live data from Hacker News

Falsehoods programmers believe about networks

blog.erratasec.com

21–30 of 32 posts

Re: Falsehoods programmers believe about networks

#21

Earlier quoted context omitted.

>It's an internal web app -- outsiders won't be able to discover where it is (@biosshadow) explain

If it has a public IP address, it can be discovered.

Even if it doesn't have a public ip address, its existence can be discovered if an organization's DNS isn't separated into public and private.

Then there are all the ways an employee can inadvertently or intentionally make its existence public.

Re: Falsehoods programmers believe about networks

#22
post #7

Earlier quoted context omitted.

I tried to write up a little about the ones that I know something about, here it is: Data on the network cannot be altered. False, if something goes through another device, it can be altered. Important because, well, man in the middle. Encrypted data on the network cannot be altered. Same as the above. Harder, but still doable Data cannot be accidentally corrupted, because TCP has checksums and Ethernet has CRCs This…

> The only thing that cares at the application layer is the application code, True, but... > it can just say "everything is little endian" and be done with it. ... doesn't quite follow. If you're blitting integers directly, your code will break on either a big- or little-endian boxes. Better to pick a standard encoding and always serialize/deserialize properly whatever that means. That standard encoding may be little…

I had taken that to read that there are programs in the wild that assume hosts are little endian and always "swap" bytes as opposed to converting between the two orders (which might be a no-op on a big endian system).

Re: Falsehoods programmers believe about networks

#23

Also: - MAC addresses are unique. - LANs won't be bridged. - Spanning tree will converge quickly. - Quickly enough that it will beat BIOS getting to DHCP for netbooting. - There will only be one circuit in the network so you can disable spanning tree. - The path MTU will be at least 1500 (or 9000, or x). - Path MTU discovery will work. - Packets with DF bit set won't be fragmented. - ICMP won't be dropped. - Network…

> MAC addresses are unique

Or at least they're unique on a single machine... except for the various OSes and hardware platforms that have deliberately made all MAC addresses the same for a given machine.

Re: Falsehoods programmers believe about networks

#26
post #23

Also: - MAC addresses are unique. - LANs won't be bridged. - Spanning tree will converge quickly. - Quickly enough that it will beat BIOS getting to DHCP for netbooting. - There will only be one circuit in the network so you can disable spanning tree. - The path MTU will be at least 1500 (or 9000, or x). - Path MTU discovery will work. - Packets with DF bit set won't be fragmented. - ICMP won't be dropped. - Network…

> MAC addresses are unique Or at least they're unique on a single machine... except for the various OSes and hardware platforms that have deliberately made all MAC addresses the same for a given machine.

Ah, the old weak host model quirk of Linux IP stack and helpful RHEL6 (https://technet.microsoft.com/en-us/library/2007.09.cableguy...). I'm not quite sure why it came about though.

One more: - There will never be more than 1000/2000/... MAC addresses per subnet.

Re: Falsehoods programmers believe about networks

#27
post #21

Earlier quoted context omitted.

If it has a public IP address, it can be discovered.

Even if it doesn't have a public ip address, its existence can be discovered if an organization's DNS isn't separated into public and private. Then there are all the ways an employee can inadvertently or intentionally make its existence public.

I know. :-) all those people downvoting... and not one of them typed in the following Google search:

https://www.google.com.au/search?q=discovering+internal+web+...

Leading to gems like this:

https://www.verisgroup.com/2014/07/15/internal-web-applicati...

And this:

https://books.google.com.au/books?id=lXr0AgAAQBAJ&pg=PA429&l...

Or even this:

http://www.pentest-standard.org/index.php/Intelligence_Gathe...

Re: Falsehoods programmers believe about networks

#28
post #24

A few more: - Localhost is 127.0.0.1 - A TCP SYN will also always result in a SYN-ACK - Ok, a SYN-ACK or a RST - Ok, ok, an out-going TCP packet will always result in a TCP response

"Nobody will ever be stupid enough to stick debug data in TCP RST payloads on a production system"

https://support.f5.com/kb/en-us/solutions/public/13000/200/s...

Re: Falsehoods programmers believe about networks

#29
post #22

Earlier quoted context omitted.

> The only thing that cares at the application layer is the application code, True, but... > it can just say "everything is little endian" and be done with it. ... doesn't quite follow. If you're blitting integers directly, your code will break on either a big- or little-endian boxes. Better to pick a standard encoding and always serialize/deserialize properly whatever that means. That standard encoding may be little…

I had taken that to read that there are programs in the wild that assume hosts are little endian and always "swap" bytes as opposed to converting between the two orders (which might be a no-op on a big endian system).

Yeah, that's probably the case, and quite possibly what was intended. I think my elaboration deals fine with that case too, though.
Post reply on HN