Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

Five files that show how an attacker reaches your database

Picture the question landing on your desk on a Monday. "Can someone get from the internet to our customer database?" Most teams answer it with a list of findings. A list doesn't answer the question. A path does, and you

Picture the question landing on your desk on a Monday. "Can someone get from the internet to our customer database?"

Most teams answer it with a list of findings. A list doesn't answer the question. A path does, and you can build one from five files you already have. Each takes a few minutes to export. None of them changes anything on the system it comes from.

File one: the edge firewall's configuration

This is where a path starts. The file says which addresses are published to the internet, which rules let traffic in, and what sits behind them.

On a FortiGate, turn paging off before you start, or the output gets cut:

config system console
set output standard
end
show full-configuration

Log the SSH session to a file while you run it. Use "show full-configuration" and not the short form. The short form leaves out every setting still at its default, and defaults are where a lot of exposure lives.

File two: your identity provider's exports

Once someone is inside, the next question is who they can become. The sign-on policies tell you part of it. The rest is in other exports: who holds admin roles, which API tokens exist, which networks are trusted. One export doesn't show you the whole tenant. Take all of them.

File three: your cloud roles

In AWS, one command writes every user, group and role with their policies and trust relationships:

aws iam get-account-authorization-details --output json > aws-iam.json

It needs one read permission, iam:GetAccountAuthorizationDetails. The file holds no long-lived secrets. The policy documents in it are still sensitive, so treat it like any other security document. It doesn't include password age, MFA status or access-key age. Those are in the credential report.

File four: your endpoint policy

A path often runs through a workstation or a server. Whether it stops there depends on the prevention policy that machine is in. That is a different question from whether the product is installed. With CrowdStrike Falcon, an API client with read access can save the prevention and sensor-update policies as JSON. The file shows which protections are switched on for which groups of machines.

File five: your backup configuration

Attackers go for backups because backups are the way back. Veeam's REST API returns the jobs and the repositories as JSON. From those two answers you can see what is backed up, where it lands, and how each repository is set up.

What no file shows

Be straight with yourself about the limits. A configuration file doesn't tell you whether a signature set is current, whether a certificate expired last week, or whether someone is using the access a rule allows. Anyone who reads files for you should list what they did not read, system by system.

Joining them into one path

Each file answers one question. Together they answer the one you were asked on Monday.

  • The firewall shows what is reachable from outside.
  • Identity shows who that foothold can sign in as.
  • Cloud roles show what that identity can do.
  • Endpoint policy shows where the path could have been stopped.
  • Backup configuration shows what is left if it wasn't.

Follow those in order and you have a path, step by step, each step resting on a line in a file you can open.

Then count. For each fix you could make, how many paths does it cut? In our sample company, which is fictional, there are 63 findings and 13 paths to the systems that matter most. One change to one firewall policy cuts 6 of the 13. That is the fix for this week. The other 62 findings can wait their turn.

You already have the files. The export steps for each system are written out here: https://cybertwin.io/guides

And you can see the sample company's paths, and paste a FortiGate config of your own, here: https://cybertwin.io/sample

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.