• Emily (she/her)@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    19
    arrow-down
    2
    ·
    8 hours 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
      2
      ·
      edit-2
      1 hour 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 pushing their shiny frontend.

      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, with the minimum amount of thought.

      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 why the backend is especially the part you can’t build anything decent without thinking about.

    • sylver_dragon@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      4 hours 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
        2
        ·
        2 hours 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.

    • Grendel84?@tiny.tilde.website
      link
      fedilink
      arrow-up
      2
      ·
      8 hours 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.

  • taiyang@lemmy.world
    link
    fedilink
    arrow-up
    76
    ·
    16 hours 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.

    • ChickenLadyLovesLife@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      11 hours ago

      If I was a hacker, I would just get a job as a night cleaning person at corporate office buildings. And then just help myself to the fucking post-it notes with usernames and passwords on them.

    • hoshikarakitaridia@lemmy.world
      link
      fedilink
      arrow-up
      93
      arrow-down
      1
      ·
      19 hours ago

      Social engineering is probably 95% of modern attack vectors. And that’s not even unexpected, some highly regarded computer scientists and security researchers concluded this more than a decade ago.

      • snooggums@lemmy.world
        link
        fedilink
        English
        arrow-up
        47
        arrow-down
        1
        ·
        19 hours ago

        When the technical side reaches a certain level of security, the humans become the weakest link.

      • 4am@lemmy.zip
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        15 hours ago

        This has been the case for 40+ years. Humans are almost always the weakest link.

      • qqq@lemmy.world
        link
        fedilink
        arrow-up
        18
        arrow-down
        6
        ·
        edit-2
        17 hours ago

        I work in security and I kinda doubt this. There are plenty of issues just like what is outlined here that would be much easier to exploit than social engineering. Social engineering costs a lot more than GET /secrets.json.

        There is good reason to be concerned about both, but 95% sounds way off and makes it sound like companies should allocate significantly more time to defend against social engineering, when they should first try to ensure social engineering is the easiest way to exploit their system. I can tell you from about a decade of experience that it typically isn’t.

        • kautau@lemmy.world
          link
          fedilink
          arrow-up
          21
          ·
          17 hours ago

          https://www.infosecinstitute.com/resources/security-awareness/human-error-responsible-data-breaches/

          You’re right. It’s 74%.

          https://www.cybersecuritydive.com/news/clorox-380-million-suit-cognizant-cyberattack/753837/

          It’s way easier to convince someone that you are just a lost user who needs access than it is to try to probe an organization’s IT security from the outside.

          This is only going to get worse with the ability to replicate other’s voices and images. People already consistently fall for text message and email social engineering. Now someone just needs to build a model off a CSO doing interviews for a few hours and then call their phone explaining there has been a breach. Sure, 80% of good tech professionals won’t fall for it, but the other 20% that just got hired out of their league and are fearing for their jobs will immediately do what they are told, especially if the breach is elaborate enough to convince them it’s an internal security thing.

          • qqq@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            4 hours ago

            Yes social engineering can be incredibly effective. I completely agree, but there is a bit of an obsession with it these days and imo it’s over indexed, because at the end of the day the type of social engineering detailed in that report typically just provides access.

            In some cases, the target is important enough and has enough organizational power that accessing the network as them is sufficient, but that’s not often the case. What that means is that in those other cases social engineering (which in that report you cited is often just phishing) is providing, typically, internal network access. An attacker will have to move through the network and exploit software typically to continue their attack. There are many points in this chain that the weakness lies in software or configuration. If effort was placed on making those systems better it would likely see better results than hyper focusing on the social engineering, which is significantly more difficult to stop, especially with all of the things you mentioned on the horizon.

            My point is then that even if it is a part of 74% of breaches, according to Verizon, it’s not necessarily sufficient and is often paired with software level exploits.

            And I know this because my company does plenty of red teaming, and we use social engineering but at the end of the day the more interesting result comes from a software exploit or just abusing a weak configuration.

            • loudwhisper@infosec.pub
              link
              fedilink
              arrow-up
              1
              ·
              3 hours ago

              You are right and what some people miss is that social engineering being the vector to gain foothold doesn’t mean that it was sufficient to allow the breach. Almost always you need some other weakness (or a series of them). Except when the weaknesses are so had that you don’t need a foothold at all (like this case), or when the social engineering gives you everything (rare, but you might convince you someone to give you access to data etc.).

              A whole separate conversation is deserved by how effective (or not) social engineering training is. Quite a few good papers about the topic came out in the last fee years.

    • 4am@lemmy.zip
      link
      fedilink
      arrow-up
      25
      ·
      15 hours ago

      I think that’s less about “hacking” and more about modern day devs being overworked by their hot-shit team lead and clueless PMs and creating “temporary” solutions that become permanent in the long run.

      This bucket was probably something they set up early in the dev cycle so they could iterate components without needing to implement an auth system first and then got rushed into releasing before it could be fixed. That’s almost always how this stuff happens; whether it’s a core element or a rushed DR test.

    • Monument@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      34
      ·
      edit-2
      18 hours ago

      Many years ago, I discovered that my then-employer’s “home built” e-commerce system had all user and admin passwords displayed in plaintext at home/admin/passwords.

      When I brought this to the attention of leadership, they called the “developer” in and he said “oh, well, that’s IP locked, so no one on the web can access it!” When I pulled it up on my phone, he insisted my phone was on the work WiFi, despite it being clearly verifiable that was not the case. (The same work WiFi that had an open public connection, which is the one my phone would have been on, if it were on it…)

      He did fix that, but many other issues remained. Eventually a new COO hired someone competent as his ‘backup’, replaced our website and finally suggested he pursue other employment opportunities before he could no longer voluntarily pursue them. (There was concern he might sabotage.)

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    10
    ·
    12 hours 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
    19
    arrow-down
    1
    ·
    15 hours ago

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

      • Constant Pain@lemmy.world
        link
        fedilink
        arrow-up
        11
        arrow-down
        1
        ·
        8 hours 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…

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      16
      arrow-down
      5
      ·
      12 hours 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
            9
            ·
            9 hours 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
              arrow-down
              5
              ·
              8 hours 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
                15
                ·
                7 hours 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
                  arrow-down
                  4
                  ·
                  6 hours 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
                  arrow-down
                  4
                  ·
                  7 hours 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.

  • Ignotum@lemmy.world
    link
    fedilink
    arrow-up
    78
    ·
    20 hours ago

    I remember when a senior developer where i worked was tired of connecting to the servers to check its configuration, so they added a public facing rest endpoint that just dumped the entire active config, including credentials and secrets

    That was a smaller slip-up than exposing a database like that (he just forgot that the config contained secrets) but still funny that it happened

    • PattyMcB@lemmy.world
      link
      fedilink
      arrow-up
      39
      arrow-down
      1
      ·
      16 hours ago

      That’s not a “senior developer.” That’s a developer that has just been around for too long.

      Secrets shouldn’t be in configurations, and developers shouldn’t be mucking around in production, nor with production data.

    • palordrolap@fedia.io
      link
      fedilink
      arrow-up
      14
      ·
      18 hours ago

      I would have put IP address access restrictions on that at the very least. I may have even done something like that more than once for various tools in the past.

      That way it acts completely open to people (or other servers) in the right places and denies all knowledge to anything else.

  • jaybone@lemmy.zip
    link
    fedilink
    English
    arrow-up
    26
    ·
    17 hours ago

    What was the BASE_URL here? I’m guessing that’s like a profile page or something?

    So then you still first have to get a URL to each profile? Or is this like a feed URL?

  • Rhaedas@fedia.io
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    18 hours ago

    Even the best models fine tuned for coding still have training that was based on both good and bad examples of programming from humans. And since it’s not AGI but using probability to generate the code, you’re going to get crap programming logic dependent on how often such things were used and suggested by humans to other humans. Googling for an answer on how to code something pulls up all sorts of answers from many sources, but reading through them, many are terrible. An LLM doesn’t know that, it just knows that humans liked some answers better than others, so GIGO.

    • 2910000@lemmy.world
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      edit-2
      12 hours ago

      The original article is paywalled (I mean, registration-walled?), this summary is not

      404 Media reported that 4chan users claimed to be sharing personal data and selfies from Tea after discovering an exposed database.

  • Diurnambule@jlai.lu
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    20 hours ago

    I wonder if their data is poisoned by below average Dev. I mean if your test subjects are met or below Dev and mad Ethel lost 20% efficiency imagine what you can do to good dev

    • Thorry84@feddit.nl
      link
      fedilink
      arrow-up
      16
      ·
      edit-2
      19 hours ago

      Not below average dev necessarily, but when posting code examples on the internet people often try to get a point across. Like how do I solve X? Here is code that solves X perfectly, the rest of the code is total crap, ignore that and focus on the X part. Because it’s just an example, it doesn’t really matter. But when it’s used to train an LLM it’s all just code. It doesn’t know which parts are important and which aren’t.

      And this becomes worse when small little bits of code are included in things like tutorials. That means it’s copy pasted all over the place, on forums, social media, stackoverflow etc. So it’s weighted way more heavily. And the part where the tutorial said: “Warning, this code is really bad and insecure, it’s just an example to show this one thing” gets lost in the shuffle.

      Same thing when an often used pattern when using a framework gets replaced by new code where the framework does a little bit more so the same pattern isn’t needed anymore. The LLM will just continue with the old pattern, even though there’s often a good reason it got replaced (for example security issues). And if the new and old version aren’t compatible with each other, you are in for a world of hurt trying to use an LLM.

      And now with AI slop flooding all of these places where they used to get their data, it just becomes worse and worse.

      These are just some of the issues why using an LLM for coding is probably a really bad idea.

      • floofloof@lemmy.ca
        link
        fedilink
        arrow-up
        3
        ·
        16 hours ago

        Yeah, once you get the LLM’s response you still have to go to the documentation to check whether it’s telling the truth and the APIs it recommends are current. You’re no better off than if you did an internet search and tried to figure out who’s giving good advice, or just fumbled your own way through the docs in the first place.

        • chicken@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          10 hours ago

          You’re no better off than if you did an internet search and tried to figure out who’s giving good advice, or just fumbled your own way through the docs in the first place.

          These have their own problems ime. Often the documentation (if it exists) won’t tell you how to do something, or it’s really buried, or inaccurate. Sometimes the person posting StackOverflow answers didn’t actually try running their code, and it doesn’t run without errors. There are a lot of situations where a LLM will somehow give you better answers than these options. It’s inconsistent, and the reverse is true also, but the most efficient way to do it is to use all of these options situationally and as backups to each other.

          • floofloof@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            9 hours ago

            Yes, it can be useful in leading you to look in the right place for more information, or orienting you with the basics when you’re working with a technology that’s new to you. But I think it wastes my time as often as not.

            • chicken@lemmy.dbzer0.com
              link
              fedilink
              arrow-up
              1
              ·
              9 hours ago

              That’s implying that the quality of information from other sources is always better, but I’m saying that’s sometimes not true; when you’re trying to figure out the syntax for something, documentation and search engines have failed you, and the traditional next step would be to start contacting people or trying to find the answer in unfamiliar source code, sometimes a LLM can somehow just tell you the answer at that point and save the trouble. Of course you have to test that answer because more often than not it will just make up a fake one but that just takes a few seconds.

              There are some situations I’m going back to search engines as a first option though, like error messages, LLMs seem to like to get tunnel vision on the literal topic of the error, while search results will show you an unintuitive solution to the same problem if it’s a very common one.

        • Kay Ohtie@pawb.social
          link
          fedilink
          English
          arrow-up
          4
          ·
          16 hours ago

          whether it’s telling the truth

          “whether the output is correct or a mishmash”

          “Truth” implies understanding that these don’t have, and because of the underlying method the models use to generate plausible-looking responses based on training data, there is no “truth” or “lying” because they don’t actually “know” any of it.

          I know this comes off probably as super pedantic, and it definitely is at least a little pedantic, but the anthropomorphism shown towards these things is half the reason they’re trusted.

          That and how much ChatGPT flatters people.

          • floofloof@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            12 hours ago

            Yeah, it has no notion of being truthful. But we do, so I was bringing in a human perspective there. We know what it says may be true or false, and it’s natural for us to call the former “telling the truth”, but as you say we need to be careful not to impute to the LLM any intention to tell the truth, any awareness of telling the truth, or any intention or awareness at all. All it’s doing is math that spits out words according to patterns in the training material.

      • Diurnambule@jlai.lu
        link
        fedilink
        arrow-up
        3
        ·
        16 hours ago

        Didn’t expect this much. I don’t think about tuto example being weighted heavier. This make sense.

  • qqq@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    12
    ·
    edit-2
    17 hours ago

    Not a big fan of the wording here. Plenty of skilled programmers make dumb mistakes. There should always be systems in place to ensure these dumb mistakes don’t make it to production. Especially when related to sensitive information. Where was the threat model and the system in place to enforce it? The idea that these problems are caused by “shit programmers” misses the real issue: there was either no system or an insufficient system to test features and define security requirements.

    • rozodru@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      16 hours ago

      I can tell you exactly what happened. “Hey Claude, I need to configure and setup a DB with Firebase to store images from our application.” and then promptly hit shift+tab and then went to go browse Reddit.

      nothing was tested. nothing was verified. They let the AI do its thing they checked in on it after an hour or so. once it was done it was add all, commit -m “done”, push origin master. AI doesn’t implement security stuff. there was zero security here.

      • qqq@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        5 hours ago

        I have found the exact same type of bug shown here probably over a dozen times, most of those long before AI was writing code.

      • floofloof@lemmy.ca
        link
        fedilink
        arrow-up
        4
        arrow-down
        2
        ·
        16 hours ago

        I found someone who hasn’t yet made their big dumb mistake. Give it time.

          • deadbeef79000@lemmy.nz
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            edit-2
            5 hours ago

            You’ve probably already made your Big Dumb Mistake, it just hasn’t been triggered yet.

            Or, you just weren’t there any more when it triggered.