APOPS Assurance

IT audit process guide: how to run audit scripts safely

A reusable IT audit process for any audit script: scope and authorisation, system identification, script selection, prerequisites, execution, evidence handling, findings, risk assessment, remediation and retesting.

Free · works with every script in the library · APOPS Assurance

1. Scope and authorisation

  • Write down which systems, sites, cloud projects or applications are in scope, and which are not.
  • Get written approval from the system owner before running any script (email or the engagement letter). For APIs and websites, the owner must confirm in writing.
  • Agree the time window, a contact person and what to do if something unexpected happens.

2. System identification

  • List each system with its name, IP address, operating system, owner and data it holds (use the Computer Inventory Register or Asset Inventory Register).
  • Mark critical systems (domain controllers, databases, payment systems) so they get the full set of scripts.

3. Script selection

  • Pick the script for each system type: Active Directory, Windows, Linux, firewall, Google Cloud, database, web application, API, credential scan, compliance and storage.
  • Use the performance script only with a change request, never as part of an audit: it can change settings.

4. Prerequisites

  • Check each script's prerequisites: modules (RSAT), clients (mysql, psql, sqlcmd, gcloud), and network access.
  • Create named, least-privilege audit accounts (read-only where possible) and an expiry date for them.

5. Execution

  • Open the correct console as described on the script page (Command Prompt as administrator, terminal with sudo, Cloud Shell).
  • Run the script, answer its questions and keep the window open until it says Done.
  • Note the date, time, system and account used in your audit log.

6. Evidence handling

  • Each script writes a dated folder. Copy it to your evidence store, compute a hash if your method requires it (Get-FileHash or sha256sum) and record it.
  • Treat the results as confidential: they describe weaknesses. Delete them from the audited system afterwards.
  • The scripts mask secrets and never print password hashes, but file names and settings are still sensitive.

7. Findings

  • Start with summary.txt: every FAIL and WARN is a potential finding. Confirm each one (false positives happen).
  • Write each finding with condition (what you saw), criteria (policy or standard), cause, effect and recommendation. Use the Audit Findings Register.

8. Risk assessment

  • Rate each finding by likelihood and impact (for example High, Medium, Low) using your risk methodology.
  • Internet-facing exposure, admin rights, personal data and missing backups usually raise the rating.

9. Remediation

  • Agree an owner and a due date for each finding. Use change management for every fix.
  • Track progress in the Audit Findings Register or Issue Log.

10. Retesting

  • Run the same script again after the fix, on the same system, and keep both result folders.
  • Close a finding only when the new summary.txt shows PASS (or the risk is formally accepted with a Risk Acceptance Form).

Reading the results

  • PASS: the control is in place. Keep it as evidence.
  • WARN: a weakness or something to confirm. Usually a low or medium finding.
  • FAIL: a control is missing or broken. Usually a high finding with an agreed fix date.
  • INFO: facts for the report: counts, versions and settings to compare with your policy.

Least privilege

  • Use a named audit account with read-only rights where the script allows it, for the audit window only.
  • Never run routine audits as Domain Admin, root, sa, postgres or project Owner.
  • The performance script changes settings: run it only under an approved change request, never as part of an audit.

Audit templates for this process

Audit scripts

WindowsLinuxmacOSIT asset inventoryComputer Inventory Script (Windows, Linux, macOS)Fills the computer inventory register from the computers themselves, so serial numbers, specs and network details are complete and correct.Windows, Linux, macOSView script →WindowsActive DirectoryActive Directory Audit Script (users, computers, policies, access)Gives an auditor or IT admin the full Active Directory picture in one run: who has access, which accounts are stale or risky, and whether the domain pWindows Server / domain-joined WindowsView script →WindowsWindows endpoints and serversWindows Security Audit Script (users, network, ARP, sign-ins, permissions)Checks one Windows computer or server against common security controls and collects the evidence an IT auditor needs, without changing anything.Windows 10/11, Windows Server 2016+View script →LinuxLinux serversLinux Security Audit Script (users, sudo, SSH, ports, permissions)Checks one Linux server against common hardening controls and collects audit evidence without changing anything.Ubuntu, Debian, RHEL, Rocky, AlmaLinux, CentOS, Amazon LinuxView script →WindowsLinuxFirewallsFirewall Configuration and Rules Audit Script (Windows and Linux)Gives the auditor a complete, dated export of host firewall rules and a list of risky rules to review with the network team.Windows Firewall; Linux ufw, firewalld, nftables, iptablesView script →Google Cloud ShellGoogle CloudGoogle Cloud Security Audit Script (IAM, firewall, logging, storage)Reviews the security configuration of one Google Cloud project with the viewer and security reviewer roles only, and produces evidence files.Google Cloud Shell (gcloud)View script →WindowsLinuxmacOSApplications and databasesDatabase Access Audit Scripts (MySQL, PostgreSQL, SQL Server)Reviews who can reach each database and with what rights, and whether the server settings meet good practice, using SELECT statements only.MySQL/MariaDB, PostgreSQL, Microsoft SQL ServerView script →WindowsLinuxmacOSApplications and databasesWeb Application Security Check Script (Laravel, PHP, JavaScript)Finds the most common, high-impact web application mistakes before an attacker does, without changing code or sending attacks.Laravel, PHP and JavaScript projects (Windows, Linux, macOS)View script →WindowsLinuxmacOSAPIsAPI Security Check Script (safe GET, HEAD and OPTIONS only)Gives a quick, non-intrusive view of an API's exposure before or between penetration tests, without sending data or trying passwords.Any REST or GraphQL API (run from Windows, Linux or macOS)View script →WindowsLinuxmacOSCredential exposureCredential Exposure Scan Script (masked, safe output)Finds secrets stored in plain text so they can be rotated and moved to a secrets manager, without copying the secrets into the audit evidence.Windows, Linux, macOS (folders, code, shared drives)View script →WindowsLinuxCompliance and storageCompliance and Storage Check Script (ISO 27001, GDPR, PCI basics)Turns a set of audit controls into PASS/WARN/FAIL results with the control reference, ready to paste into an audit checklist.Windows 10/11, Windows Server, LinuxView script →
Need help to pay?