• JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    37
    ·
    edit-2
    6 days ago

    Hack has at least two definitions in a computing context.

    1. A nifty trick or shortcut that is useful. “Check out this hack to increase your productivity.”
    2. Accessing something you shouldn’t. “They hacked into the database.”

    A lot of times they sort of get used in conjunction to describe interesting ways to gain access to secure systems, but using it to describe accessing insecure things you shouldn’t is still a valid usage of the phrase.

    That said I definitely wanna see the company face charges for this, this is insane.

    • SpaceCowboy@lemmy.ca
      link
      fedilink
      arrow-up
      19
      ·
      6 days ago

      Yeah, if I leave my house door wide open for a few weeks and I get robbed, it’s still burglary.

      • Rivalarrival@lemmy.today
        link
        fedilink
        English
        arrow-up
        9
        ·
        5 days ago

        Terrible analogy. A webserver is not at all like a door. It doesn’t block or allow traffic to and from your file system.

        A web server is more like a receptionist. It handles requests. “Can I have your basic catalog?” “Certainly, here you go.”

        “Can I get this item from your basic catalog?” “Certainly.”

        “I don’t see it in your catalog, but my buddy said he got this other item from you. Can I have this other item too?” “Absolutely.”

        “Can I borrow your stapler?” Sure. “How about a pad of paper?” “Of Course”. “Can I just have the contents of your supply closet?” “Here you go.” “How about your accounting files, can I get those?” “No problem!” “How about your entire customer list?” “Consider it done!”

        When you hire a receptionist and specifically tell them to give customers anything they request, that’s entirely on you. You have to at least make a token effort to restrict access to only authorized users before you can even claim that a particular user was unauthorized.

        This wasn’t burglary. This was putting up signs that say “come in” and labeling everything in your house with “free” stickers.

      • Grendel84?@tiny.tilde.website
        link
        fedilink
        arrow-up
        12
        ·
        6 days ago

        @SpaceCowboy @JackbyDev

        In a legal context there’s also the concept of a “reasonable expectation of privacy”. The computer abuse and fraud act defines hacking as accessing data or systems you are not authorized to access.

        A better analogy is putting your journal in a public library and getting mad when somone reads it.

        I’m not saying what these ass holes did was right, I’m saying that the company weakened their legal position by not protecting the data.

        • SpaceCowboy@lemmy.ca
          link
          fedilink
          arrow-up
          9
          ·
          6 days ago

          Terrible analogy. You have permission to read books in a library.

          Forgetting to lock your door isn’t granting permission to people enter your house, and it doesn’t grant people permission to take your valuables. It may be neglectful to leave your door unlocked, but it doesn’t imply granting permission to enter your house.

          Same goes with computer security. Leaving your computer insecure may be neglectful, but it does not imply someone has permission to take your data.

          • Grendel84?@tiny.tilde.website
            link
            fedilink
            arrow-up
            2
            ·
            6 days ago

            @SpaceCowboy

            Then how do I know what I am not allowed to access?

            In this specific case there was no (formal) indication that the data was out of bounds.

            I can’t put 10 pdf files in a web dir and claim 5 are public and 5 are private, then charge you with a crime for viewing them.

            You can’t have “unauthorized access” when there’s no authorization at all

            • SpaceCowboy@lemmy.ca
              link
              fedilink
              arrow-up
              4
              ·
              6 days ago

              If I’m clicking around on a website and find a gallery of images, that’s something I’m supposed to have access to. If I start typing in URLs that aren’t linked anywhere on the site, then I’m accessing stuff the site hasn’t explicitly indicated I have access to. If I’m doing this with the intent of getting data and distributing to others, then yeah that would be illegal.

              The law allows for someone to exercise judgement. The people who do this are not so coincidentally called Judges. If the 4chan guys had have been white hat and reported the issue to the site owners, then they’d be fine. But it’s obvious to anyone their intent was to get private information, they poked around to find some private information, and then distributed that private information to others causing a privacy violation. Yes, it was easier to do than it should have been, but it’s obvious they had malicious intent and it’s obvious they were accessing information they weren’t supposed to access.

              A crime being really easy to commit doesn’t make it no longer a crime. Many times I’ve seen things that I could easily steal, but I don’t steal things when I have an opportunity to do so because a) stealing is wrong and b) saying “they just left this thing out there in a place anyone could steal it” would not be any kind of legal defense. Simply because you’re presented an opportunity to do a crime doesn’t mean it’s acceptable to do a crime, both legally and morally speaking.

              • Rivalarrival@lemmy.today
                link
                fedilink
                English
                arrow-up
                2
                ·
                5 days ago

                I start typing in URLs that aren’t linked anywhere on the site, then I’m accessing stuff the site hasn’t explicitly indicated I have access to.

                Doesn’t work like that. With the policy you describe, anyone who ever sees a “404” error is a criminal.

                I don’t have to publish everything I am willing to offer. You are free to ask for something I may or may not have. I get to decide how to respond to your request.

                To use your analogy, I can walk up to your door and request a glass of water. You’ve never explicitly offered a glass of water to anyone; I’m still allowed to ask. If you dont want me to have your water, you can say “No” or you can ignore me.

                When you go ahead and give me a glass of water, you don’t get to claim I stole it from you. It is not theft to ask.

                You have to make some sort of effort to have your web server limit my access, and I have to make some sort of effort to convince your webserver to bypass those restrictions before you can claim I am exceeding my authorization.

        • iii@mander.xyz
          link
          fedilink
          English
          arrow-up
          7
          ·
          6 days ago

          A better analogy is putting your journal in a public library and getting mad when someone reads it.

          Good analogy indeed. I’d go one step further and add: it’s like promising others you’ll keep their diary safe, then putting it in a public library, to then get mad when someone reads it.

          • Grendel84?@tiny.tilde.website
            link
            fedilink
            arrow-up
            6
            ·
            6 days ago

            @iii

            Yeah the internet by design is a public space, and we must be responsible and treat it as such when handling sensative data.

            Again, it was very wrong for people to take that data and especially to post like that.

            The company also has to do their part and produce at least some kind of barrier to the data.

            Even using UUIDs and making sure the data wasn’t query-able would have been something.

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        7
        ·
        6 days ago

        Thank you! I feel like I’m taking crazy pills reading people’s reactions to this. And if it was a business instead of your house and it was customer data you weren’t protecting you should still be in trouble too. It’s like people think only one side can be in the wrong in this or that because the data wasn’t secured and in the public that gives them free reign to post it everywhere. I wonder how those people would feel if their addresses were leaked. Afterall, if you’re a homeowner your name is attached to the property and is publicly accessible.

    • Spice Hoarder@lemmy.zip
      link
      fedilink
      arrow-up
      17
      ·
      6 days ago

      No, this was a data leak. The word “hack” has legal implications and shifts the blame away from the company and onto the individual who discovered the leak.

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        6
        ·
        6 days ago

        It can be both. The company can be at fault for not keeping something secure while the people who steal the data are at fault for stealing data. Data leaks and hacks are not mutually exclusive.

        • percent@infosec.pub
          link
          fedilink
          arrow-up
          1
          ·
          6 days ago

          I don’t disagree with your main point, but I’m not sure it’s really even “stealing”, as that means to take without permission. In this case, the storage permissions were configured so that the files were publicly available to everyone, so everyone had permission to access them.

          Semantics though. It’s still unethical to access that data, even if it’s not technically stealing.

  • taiyang@lemmy.world
    link
    fedilink
    arrow-up
    95
    ·
    7 days ago

    This reminds me of how I showed a friend and her company how to get databases from BLS and it’s basically all just text files with urls. “What API did you call? How did you scrape the data?”

    Nah man, it’s just… there. As government data should be. They called it a hack.

  • Emily (she/her)@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    47
    ·
    7 days ago

    I absolutely despise Firebase Firestore (the database technology that was “hacked”). It’s like a clarion call for amateur developers, especially low rate/skill contractors who clearly picked it not as part of a considered tech stack, but merely as the simplest and most lax hammer out there. Clearly even DynamoDB with an API gateway is too scary for some professionals. It almost always interfaces directly with clients/the internet without sufficient security rules preventing access to private information (or entire database deletion), and no real forethought as to ongoing maintenance and technical debt.

    A Firestore database facing the client directly on any serious project is a code smell in my opinion.

    • tiramichu@sh.itjust.works
      link
      fedilink
      arrow-up
      24
      ·
      edit-2
      6 days ago

      It’s like people learn how to make a phone app in React Native or whatever, but then come to the shocking and unpleasant realisation that a data-driven service isn’t just a shiny user interface - it needs a backend too.

      But they don’t know anything about backend, and don’t want to, because as far as they are concerned all those pesky considerations like data architecture, availability, security, integrity etc are all just unwanted roadblocks on the path to launching their shiny app.

      And so, when a service seemingly provides a way to build an app without needing to care about any of those things, of course they take it.

      And I get it, I really do. The backend usually is the genuine hard part in any project, because it’s the part with all the risk. The part with all the problems. The place where everything can come crashing down or leak all your data if you make bad decisions. That’s the bothersome nature of data-driven services.

      But that’s exactly why the backend is important, and especially the part you can’t build anything decent without thinking about.

    • sylver_dragon@lemmy.world
      link
      fedilink
      English
      arrow-up
      19
      ·
      6 days ago

      I think it’s less about the tech picked and more about developers with no sense of security and a poor understanding of networking. I’ve seen far too many web applications where the developer needed some sort of database behind it (MySQL, PostGres, MSSQL) and so they stood up either a container or entire VM with a public IP and whatever the networking layer set to allow any IP to hit the database port. The excuse is almost always something like, “we needed the web front end to be able to reach the database, so we gave the database server/container a public IP and allowed access”. Which is wonderful, right up until half of the IP addresses in Russia start trying to brute force the database.

      • Emily (she/her)@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        13
        ·
        6 days ago

        I agree that this is ultimately a problem with developers lacking security knowledge and general understanding, but my issue with Firestore specifically is that it is a powerful tool that, while it can be adopted as part of a carefully considered tech stack, lends itself most naturally towards being a blunt force instrument used by these kinds of developers.

        My main criticism of Firestore is that it offers a powerful feature set that is both extremely attractive to amateur or constrained developers while simultaneously doing a poor job of guiding said amateurs towards creating a secure and well designed backend. In particular, the seemingly expected use case of the technology as something directly interfaced with by apps and other clients, as evidenced by the substantial support and feature set for this use case, is the main issue. This no-code no-management client driven interaction model makes it especially attractive to these developers.

        This lack of indirection through an API Gateway or service, however, imposes additional design considerations largely delegated to the security rules which can easily be missed by a beginner. For example:

        1. Many examples of amateurs take an open-by-default approach, only applying access and write restrictions where necessary and miss data that should be restricted
        2. Some amateurs deploy databases with no access or write restrictions at all
        3. There is no way to only allow a “view” of a document to a request, instead a separate document and security rules containing the private fields needs to be created. This can be fairly simple to design around but seems to be a bit of a “gotcha”, plus if you have similar but non identical sets of data that needs to be accessible by different groups it must be duplicated and manually synchronized.
        4. Since there is no way to version data models, incompatible changes require complicated workarounds or an increasingly complicated deserialization process on the client side (especially as existing clients continue to write outdated models).
        5. Schema validation of data written by clients to the database is handled by security rules, which is seemingly unintuitive or missed by many developers because I’ve seen plenty of projects miss it
        6. If clients are writing data directly, it can become fairly complex to handle and subsequently maintain their contributions, especially if the aforementioned private data documents are required or the data model changes.

        All of these pitfalls can be worked around (although I would still argue for some layer of indirection at least for writes), but at this point I’ve been contracted to 2 or 3 projects worked on by “professionals” (derogatory) that failed to account for any of these issues and I absolutely sick to death of it. I think a measure of a tools quality is whether it guides a developer towards good practices by design and I have found Firestore to completely fail in that regard. I think it can be used well, and it is perfectly appropriate for small inconsequential (as in data leaks would be inconsequential) single developer projects, but it almost never is.

    • meme_historian@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      10
      ·
      6 days ago

      Ah yes, Firebase. The Google version of leaking all your company data through a public S3 bucket

      I remember when they launched and started pushing it in the Android dev community. Actually won a Google Pixel at a Firebase sponsored hackathon in my town…after that I never touched Firestore again. Using that ACL language to restrict access, you could see the massive foot gun from a mile away

    • Grendel84?@tiny.tilde.website
      link
      fedilink
      arrow-up
      5
      ·
      7 days ago

      @EmilyIsTrans @lena

      sounds like firebase itself is a hack.

      I’m honestly embarrassed by my fellow devs more often than not these days.

      What the fuck happened to craftsmanship? Or taking pride in your work?

      oh right, techbro startup culture garbage ended it.

  • Diplomjodler@lemmy.world
    link
    fedilink
    arrow-up
    25
    ·
    6 days ago

    I always get irrationally angry when i see python code using os.path instead of pathlib. What is this, the nineties?

      • Diplomjodler@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        6 days ago
        • Everything is in one library which offers consistency for all operations.
        • You can use forward slashes on Windows paths, which makes for much better readability.
        • You can access all the parts of a pathlib object with attributes like .stem, .suffix or .parent.
        • You can easily find the differences between paths with .relative_to()
        • You can easily build up complex paths with the / operator (no string additions).

        Just off the top of my head.

        • brucethemoose@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          6 days ago

          I suppose os.path is simpler? It’s a string and operation.

          Python is all about ‘attention efficiency,’ which there’s something to be said for. People taking the path of least resistance (instead of eating time learning the more complex/OOP pathlib) to bang out their script where they just need to move a file or something makes sense. I’m with you here, but it makes sense.


          …Also, os.path has much better Google SEO, heh.

    • percent@infosec.pub
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      6 days ago

      I’m no lawyer, but this seems like at least grounds for a class action lawsuit, I would think. Like, it seems like privacy and security is implied (however ironic for an app like this) when requiring users to upload their PII.

      Also, I assume their privacy policy didn’t mention that they were just gonna publish their users’ PII.

    • finitebanjo@lemmy.world
      link
      fedilink
      arrow-up
      15
      ·
      6 days ago

      An app called Tea™ was marketed as a safespace for women and used government issued IDs as a way to verify users.

      4Chan users leaked all of the IDs onto the larger internet.

        • finitebanjo@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          6 days ago

          Well, I get what you mean, but a “honey trap” idiom in English, also called a “honeypot scheme”, usually refers to utilizing romantic connections to influence people to make decisions or release confidential information.

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    20
    ·
    7 days ago

    who’d have thought that javascript and client side programming was incredibly susceptible to security flaws and deeply unsafe

  • Constant Pain@lemmy.world
    link
    fedilink
    arrow-up
    20
    ·
    7 days ago

    Disabling index and making the names UUID would make the directory inviolable even if the address was publicly available.

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      18
      ·
      7 days ago

      Sounds like a good case for brute forcing the filenames. Just do the proper thing and don’t leave your cloud storage publicly accessible.

          • FooBarrington@lemmy.world
            link
            fedilink
            arrow-up
            13
            ·
            7 days ago

            A UUID v4 has 122 bits of randomness. Do you know how long that would take to brute-force, especially with network limitations?

            • 𝕸𝖔𝖘𝖘@infosec.pub
              link
              fedilink
              arrow-up
              5
              ·
              7 days ago

              It taking a long time doesn’t make it an impossibility. The fact that it has a limit of 122 bits, in and of itself, makes the possibility of a bruteforce a mathematical guarantee.

              • bamboo@lemmy.blahaj.zone
                link
                fedilink
                English
                arrow-up
                19
                ·
                7 days ago

                By this logic, all crypto is bruteforcable, on a long enough timeline.

                A 122 bit random number is 5316911983139663491615228241121378303 possible values. Even if it were possible to check 1 trillion records per second, it would take 168598173000000000 years to check all the UUIDs and get the info on all the users. Even if every human on earth signed up for the app (~8 billion people), and you wanted to just find any one valid UUID, the odds of a generating a UUID and that being valid in their DB is basically 0. You can do the math your self following the Birthday Paradox to determine how many times you would need to guess UUIDs before the probability that any one UUID is valid against a population of the whole world is greater than 50%.

                • 𝕸𝖔𝖘𝖘@infosec.pub
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  7 days ago

                  You should read into the NSA’s Translator. Granted, it’s relatively outdated with shifting text algorithms, but for a very long time (about half a century), it was able to bruteforce any key, regardless of length, in under an hour.

                • 𝕸𝖔𝖘𝖘@infosec.pub
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  7 days ago

                  It’s not, though. And thinking that it is impossible is why DES, for example, was “translatable” by the NSA for decades. Never assume something is impossible just because it’s difficult.

      • Constant Pain@lemmy.world
        link
        fedilink
        arrow-up
        14
        ·
        7 days ago

        It’s not security through obscurity in this case. The filenames can’t be obtained or guessed through brute force. At least not with current technology or processing power…

        Security through obscurity is when you hide implementation details.

        Saying that my suggestion is security through obscurity is the same as telling that ASLR is security through obscurity…

        • Scrappy@feddit.nl
          link
          fedilink
          arrow-up
          1
          ·
          6 days ago

          Until the psuedo random UUID generator can be reverse engineered. Makes me think of this video: https://youtu.be/o5IySpAkThg

          Anyway, I think we’re on the same wavelength and both agree that the implementation as is isn’t production-ready to say the least ;)

    • Valmond@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      6 days ago

      Bet you could reuse/keep UUIDs for someone/stuff that gets updated and get that new data even if you “shouldn’t”.

      It could work in theory but in practice there are always a billion things that go wrong IMO.

      • bamboo@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 days ago

        Not really sure what you mean by reusing UUIDs but theres nothing bad about using UUIDs in URLs for content you don’t want scrapped by bots. Sites like Google Photos are already are using UUIDs in the URL for the photos, and do not require any authentication to see the image as long as you have the URL. You can try this for yourself and copy the URL of an image and open it in a Private Browsing Window. Every so often someone realizes the actual image URL is public and think they’ve found a serious issue, but the reason why it isn’t is because of the massive key space UUID provides and that it would be infeasible to check every possible URL, even if it’s publicly available.

        • Valmond@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          6 days ago

          You point out the “vulnerability” yourself, sometimes (when it’s Google) it works as designed, but a less robust site could have the full access through a UUID for example and then someone shares an image with it, bam they have access to more than they should. The history is littered with bulletproof things like this ending up being used wrongly.