"One coder added at least two database entries that are visible on the live site and say “this is a joke of a .gov site” and “THESE ‘EXPERTS’ LEFT THEIR DATABASE OPEN -roro.” "

      • Yoddel_Hickory@lemmy.ca
        link
        fedilink
        English
        arrow-up
        65
        ·
        1 day ago

        If SQL injection is picking a lock, this is entering through an unlocked door.

        Not sophisticated at all, authentication on API routes is way earlier on the security checklist than SQL query sanitisation. This site is amateur work.

      • Fiestorra@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        29
        ·
        1 day ago

        Much much simpler, with a SQL injection at least you have to bypass the filters set, this is just submitting the changes through an API and the DB just eats it up.

      • _____@lemm.ee
        link
        fedilink
        English
        arrow-up
        18
        ·
        1 day ago

        SQL injection is like this: you have something you can interact with on the browser like a form containing different values.

        You hit a button and that value is sent and merged into a SQL query.

        Say the value is an user ID and you’re deleting an account, perhaps your own.

        If the coder is incompetent the API will run this query: “DELETE FROM USERES WHERE ID = <id in form>”

        Which means that if you open the developer console, change the value field for that html ID you can break that SQL line and write more SQL, or you can delete other users based on their ID.

        Essentially editing a frontend input allows that input to be ran directly by the SQL engine. It’s like having full access.

        So through that ID field you can inject more SQL code. There’s multiple ways to do this, sometimes the URL itself on a website uses these query parameters like "&search=something” and the “something” is injected into the SQL string.

        SQL injection is baby’s first exploit, this method is like granting everyone DB access.

        • otp
          link
          fedilink
          English
          arrow-up
          25
          ·
          1 day ago

          SQL injection is like picking a lock.

          This is like trying to open the door and finding out there’s no lock.

          The door isn’t necessarily obviously visible, but most buildings do tend to have doors.

          Borrowed and expanded upon another commenter’s metaphor