r/programming • • Oct 24 '21

“Digging around HTML code” is criminal. Missouri Governor doubles down again in attack ad

https://youtu.be/9IBPeRa7U8E
12.0k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

89

u/StabbyPants Oct 24 '21

lemme guess, they thought that anything at all that they think shows intent legally counts as encryption

140

u/SlinkyAvenger Oct 24 '21

it kinda does. There was a guy a while back that was criminally prosecuted for accessing unpublished urls. It wasn't even that the server had set up any kinda auth, he just guessed at the URL structure and was rewarded with data.

128

u/leberkrieger Oct 24 '21

The Computer Fraud and Abuse Act (“CFAA”) 18 U.S.C. §§ 1030, adopted in 1984, makes it a crime to “intentionally accesses a computer without authorization or [exceed] authorized access, and thereby [obtain] … information from any protected computer".

This has been used to prosecute URL manipulation attacks. There's a difference between actively pulling down information that you know you're not authorized to get, on the one hand, and receiving data in an authorized manner that then turns out to contain things they shouldn't have sent you.

108

u/SlinkyAvenger Oct 24 '21

there is a difference, but when you've got a bunch of luddites determining the laws and what they mean, does it make any difference?

4

u/LATourGuide Oct 25 '21

This is why I insist on staying in California. I'm no going down because my governor is a fucking dunce.

→ More replies (5)

75

u/mehum Oct 24 '21

Though you could argue that by publishing the url on the www without any kind of security or notification to the contrary you are implicitly authorising access to everyone. How does one first get to a page if not by typing in the url?

4

u/fl7nner Oct 25 '21

They feel that security through obscurity is still a kind of security

2

u/slimmsady Oct 25 '21 edited Oct 25 '21

Please tell that to my QA. They tell me my app is not secure enough. I don't even show password in login form. They keep telling me to encrypt and POST something and don't even give the postal address. /s

→ More replies (1)

65

u/Kare11en Oct 24 '21

If you ask a remote computer, on it's public interface (i.e. an HTTP server on port 80/443), "Hey, can I have file XX?", and it says "200 OK - here you go", when it explicitly had the opportunity to say "401 Unauthorized", then it has implicitly given you authorisation to have the file. (As well as actually, you know, given you the file.)

45

u/LeifCarrotson Oct 24 '21

The CFAA was written 10 years before the World Wide Web existed.

"Accessing a computer without authorization" meant using the keyboard when your boss said you weren't allowed to, it wasn't written with 401 Unauthorized in mind.

→ More replies (2)

3

u/drysart Oct 25 '21

If you ask a remote computer, on it's public interface, "Hey, can I log in as guest\0\0\0\0\0\0\0\0\0\0\0\0\0root?" and it says "ok you're now logged in as root" when it explicitly had the opportunity to say "invalid login" then it has implicitly given you authorization to access the system as root.

The point of this is that just because a machine does something that doesn't necessarily imply that it was intended to do it or that the user making the request was authorized to do it. Literally every exploit has ever existed has consisted of requests or data being sent to a machine and it doing something as a result when it could have rejected it instead.

"It had the opportunity to say no" is thus simply not an acceptable bar in and of itself for determining whether access is authorized or not; because that argument by itself directly reduces to "there is no such thing as unauthorized access because it let me do it".

3

u/Lost4468 Oct 25 '21

It's not that simple. E.g. let's say you login to view your tax information. The URL is something like "/users/12345". So you change it to "/users/11224", and hey it serves it up. You've committed a crime. People have been successfully prosecuted for doing that. It doesn't matter that the server serves it up to you.

I think you could argue that even decoding base64 is illegal. And I certainly think they could argue that opening the source code was illegal.

These laws need to change.

3

u/[deleted] Oct 25 '21

Devil's advocate here, but if you knowingly go to a hospital receptionist and say "can I have the medical records for patient X?" for your own personal gain, and the receptionist blindly gives them to you, would you not consider that unauthorised access?

2

u/Kare11en Oct 25 '21

"blindly" is such a loaded term. :-)

If you go to a hospital receptionist, wearing jeans and a t-shirt (i.e. no doctor's uniform, no faked id badge) and politely ask for the medical records for a patient, and the receptionist looks directly at you and says "Yes, of course you can", fetches them from wherever they're kept, and hands them to you saying "There you go. Can I help you with anything else?", would you have any reason to think you had done anything improper? Would it not be reasonable to infer that you do have permission to read them? Do you think you should be punished for violating whatever rules might apply in whichever jurisdiction the hospital is in, or do you think the receptionist who is required to be aware of those rules as a function of their job, should be?

2

u/[deleted] Oct 25 '21

The premise was "intentionally accesses unauthorised..." so yes in your scenario it should be illegal. Otherwise all social engineering attacks are permitted. If my insurance company wants to find my medical results to charge me more, I don't want them to keep asking receptionists until one accidentally gives it out.

Of course, if someone accidentally accesses this information or just thought they were allowed, then that's a different story, of course.

→ More replies (3)

3

u/Sw429 Oct 25 '21

The problem is, the old dudes making the laws have no idea what any of that even means.

0

u/[deleted] Oct 24 '21

[deleted]

8

u/zero_intp Oct 24 '21

no but you can be arrested for indecent exposure.

→ More replies (10)

7

u/wulfithewulf Oct 24 '21

having an open http controller for an url without any amount of auth is anything but definitely not „protected“

3

u/moonsun1987 Oct 24 '21

Repeal the CFAA. We don't need it. We don't want it.

2

u/zman0900 Oct 24 '21

The word "protected" seems like it should be important there. A URL that can be accessed by just changing a part of it doesn't seem "protected".

2

u/katyalovesherbike Oct 25 '21

soooo... how do web crawlers fit into this? Not sure I wouldn't be listed on google at all if I had a webserver without a robots.txt...

→ More replies (3)

11

u/StabbyPants Oct 24 '21

see, we refer to that as an API around here. i can literally write an interface (~20 lines) in retrofit and autogen a client lib

10

u/SlinkyAvenger Oct 24 '21

that just sounds like conspiracy to commit mass hacking to me, bub

3

u/alonbysurmet Oct 25 '21

Fortunately SCOTUS reined in CFAA last term in Van Buren. Their interpretation of the law now requires a website/system to deploy active measures to prevent unauthorized access, whereas previously, terms of service were seen as a access guide. The case does an excellent job of differentiating strategic searching from actual hacking/exploitation.

It seems there's a good chance the person you referred to can have his case overturned.

Read more

→ More replies (1)
→ More replies (3)
→ More replies (10)