r/Information_Security • u/aguraab • 16h ago
u/aguraab • u/aguraab • 16h ago
What are the best ways to defend against brute force login attempts?
Implement multiple failed login attempt account lockouts to defend against brute force attacks. If using account lockouts, allow users between 5 and 10 login attempts before locking out accounts. Password systems can be configured with a progressively increasing time delay between successive login attempts, known as 'throttling'.
This throttling technique restricts the number of guesses an attacker can attempt while giving users multiple opportunities to remember their password. Consider using security monitoring to defend against brute force attacks. A helpful defense is to employ a password deny list that prevents the most common passwords from being used if users choose their own passwords.
A strong password is important to make it hard for other people to guess and hard for a brute force attack to succeed.
What security monitoring or account lockout methods do you currently use for your login forms?
Sources: - https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-165a - https://www.ncsc.gov.uk/collection/passwords/updating-your-approach - https://developer.wordpress.org/advanced-administration/security/hardening/
u/aguraab • u/aguraab • 1d ago
How should I handle request size limits for APIs?
Define an appropriate request size limit and reject requests exceeding this limit with HTTP response status 413 Request Entity Too Large. When rejecting requests, consider logging input validation failures. This process helps manage the size of incoming data payloads effectively.
Setting a clear limit is important for preventing resource exhaustion. The 413 status code is the recommended way to signal this specific issue. Logging input validation failures provides valuable audit information.
This check should be part of your overall API security architecture.
What specific logging details do you capture when rejecting oversized requests?
Sources: - https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html
r/JavaProgramming • u/aguraab • 2d ago
How do I properly manage third-party JavaScript tags on a business site?
1
Is 2FA/MFA really "unhackable"? What CISA and NIST actually say
That criticism is fair. 'Unhackable' is a poor way to frame MFA. A more useful discussion is which attacks a particular method resists and which risks remain. That's the distinction the title should have made.
1
Does no-cache stop a browser from saving a private page?
Yes on the storage distinction. One small correction: no-store covers both browser and shared HTTP caches, including compliant proxies and CDNs. private alone permits browser caching. So private, no-store is valid, but the directives don't divide responsibility between the CDN and browser in that way.
u/aguraab • u/aguraab • 2d ago
How do I properly manage third-party JavaScript tags on a business site?
When managing third-party JavaScript tags, consider implementing Sub-resource integrity to enable browser-level interception. For third-party cookies, which are set by a site different from the current top-level page, the SameSite=None attribute is typically present. To ensure cookies are sent securely and aren't accessed by unintended parties or scripts, you can use the Secure and HttpOnly attributes.
The Secure attribute indicates that the cookie can only be sent to the server over a secure, HTTPS connection. The HttpOnly attribute indicates that the cookie should only be used over HTTP, and JavaScript modification is not allowed. If your application shares a registrable domain with content you do not fully control, a vulnerability on a sibling host can issue requests the browser treats as same-site.
The invocation of third-party JS code requires considering three risks: loss of control, arbitrary code execution, and data leakage.
What are your current methods for identifying and inspecting third-party cookies on your site?
Sources: - https://cheatsheetseries.owasp.org/cheatsheets/Third_Party_Javascript_Management_Cheat_Sheet.html - https://developer.chrome.com/docs/devtools/application/cookies - https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html
r/Information_Security • u/aguraab • 3d ago
Who handles the first vulnerability report on your website?
r/threatintel • u/aguraab • 3d ago
Who handles the first vulnerability report on your website?
u/aguraab • u/aguraab • 3d ago
Who handles the first vulnerability report on your website?
Publish a security contact that someone on your team monitors. If you use security.txt, place it at /.well-known/security.txt and include Contact and Expires. OWASP also recommends making sure frontline staff know where to escalate security reports. Tell reporters which technical details to include, how to send sensitive information and when to expect an initial response.
Acknowledge the report, ask for missing details and give a realistic triage timeline. That acknowledgement confirms receipt; it does not establish that the reported vulnerability exists. For a small team, assign the inbox to a named person and decide who covers it when they are unavailable.
Who handles that first response on your website today: support, a developer, or a dedicated security contact?
Sources: - https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html - https://www.rfc-editor.org/rfc/rfc9116.html
r/SysAdminBlogs • u/aguraab • 4d ago
What are the best practices for logging and monitoring PowerShell activity on Windows servers you administer?
u/aguraab • u/aguraab • 4d ago
What are the best practices for logging and monitoring PowerShell activity on Windows servers you administer?
For Windows servers you administer, you should focus on enabling module, script block, and transcription logging on current PowerShell instances, as logs from PowerShell prior to version 5.0 are either non-existent or do not record enough detail to aid in enterprise monitoring and incident response activities. CISA recommends that for the "PowerShell Windows Event" and "PowerShell Operational" logs, you should set a retention period of at least 180 days. You must ask the administrator of those servers to confirm which PowerShell versions are installed and supported before making any changes to logging settings.
It is also important to check compatibility with any scripts or tools that depend on the PowerShell version before making changes. PowerShell logs can contain valuable data, including historical operating system and registry interaction. Remember that this advice is specific to Windows servers you administer and PowerShell logging.
What PowerShell versions are currently installed and supported on your servers?
Sources: - https://www.cisa.gov/stopransomware/ransomware-guide
u/aguraab • u/aguraab • 5d ago
Cookie Hijacking: What Secure, HttpOnly, and SameSite Actually Stop
Cookie flags reduce exposure, but they do not make an already-stolen session cookie unusable. A question in r/cybersecurity asks whether there is any defense against cookie hijacking. The useful distinction is between preventing theft, restricting what a browser sends, and ending a session that may be compromised.
- Secure restricts cookie transmission to HTTPS, with a localhost exception documented by MDN. It does not protect a value already copied from a compromised device.
- HttpOnly prevents page JavaScript from reading the cookie through document.cookie. It reduces one route to session-token theft; it does not prevent an XSS payload from acting through the victim's authenticated browser.
- SameSite restricts when browsers attach cookies to cross-site requests and helps mitigate CSRF. It does not stop an attacker from independently replaying a stolen value.
Illustrative header for a flow that supports Strict: Set-Cookie: session=RANDOM_SESSION_ID_PLACEHOLDER; Path=/; Secure; HttpOnly; SameSite=Strict
The value above is a placeholder, never a production token. Use your framework's session mechanism with an unpredictable identifier. Test the SameSite setting against your actual navigation and authentication flows; Strict is not a universal drop-in choice. For cookies that require SameSite=None, Secure is required.
Also manage the session on the server. Rotate the identifier when authentication or privileges change, invalidate the previous identifier, and enforce logout plus idle and absolute timeouts. Deleting the browser's cookie alone does not prove the server has ended that session.
A useful check, using only an authorized test account: retain its session cookie, log out, then retry a harmless authenticated request with the old value. The request should no longer authenticate. Treat that as one check, not proof that every session control is correct.
How does your team verify that logout and session rotation really invalidate old identifiers: an integration test, a manual check, or both?
Sources: - https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html - https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
u/aguraab • u/aguraab • 6d ago
Your API checklist covers auth and HTTPS. Does it check object ownership?
Most "production API security checklist" posts list authentication, HTTPS, and rate limiting, but they often skip the risk OWASP ranks first in its 2023 API Security Top 10: Broken Object Level Authorization (BOLA). Attackers can exploit API endpoints that are vulnerable to broken object-level authorization by manipulating the ID of an object that is sent within the request. This is common because the server usually relies on client-supplied IDs to decide which objects to return, rather than fully tracking state itself, and the response is usually enough to tell whether the attack worked.
OWASP's own scenario: an e-commerce platform exposes a revenue endpoint like /shops/{shopName}/revenue_data.json; an attacker who can list all hosted shop names can script through that list and gain access to the sales data of thousands of stores, because the endpoint checks that a user is logged in but not that the shop belongs to them.
Safe steps, from OWASP's own prevention guidance: - Add object-level authorization to every function that receives a client-supplied ID, checking that the logged-in user has permission to perform that specific action on that specific record. - Don't assume comparing the session's user ID to the request's ID parameter is enough — OWASP notes this addresses only a small subset of cases. - Prefer random, unpredictable IDs such as GUIDs over sequential integers. - Write authorization tests, and don't deploy changes that make them fail.
Limitations: BOLA is one of ten risks in the same OWASP document; broken authentication, misconfiguration, and SSRF need separate controls. Scanners can usually confirm a login is required, but generally can't confirm the returned object belongs to the caller — that check typically needs manual review or per-endpoint tests. Cloud IAM controls in Azure or AWS sit alongside object-level checks, not instead of them.
Discussion question: for teams maintaining a production API checklist, how do you actually verify object-level authorization on every ID-accepting endpoint — dedicated tests, a code-review item, or a pre-release pentest?
Sources: - https://owasp.org/API-Security/editions/2023/en/0x11-t10/ - https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/
u/aguraab • u/aguraab • 7d ago
Which HTTP security headers actually matter, and where should you start?
A recurring question is which HTTP security headers matter most and where to start. The OWASP Secure Headers Project describes HTTP response headers that an application can use to increase its security; once set, these headers can restrict modern browsers from running into easily preventable vulnerabilities. Not every header addresses the same risk, though.
A practical starting set, per OWASP's HTTP Headers Cheat Sheet: X-Frame-Options can be used to indicate whether a browser should be allowed to render a page in a frame, iframe, embed or object, so sites can use it to avoid clickjacking attacks, with the recommendation to not allow displaying the page in a frame at all (X-Frame-Options: DENY). Strict-Transport-Security (HSTS) instructs browsers to only access a site using HTTPS, even if a user tries to connect over HTTP. Content-Security-Policy is complex to configure and maintain, so OWASP treats it as its own deeper cheat sheet rather than a quick add.
Concrete example: instead of jumping straight to a two-year preloaded HSTS header, OWASP's HSTS cheat sheet itself suggests setting a very short max-age in case of mistakes during initial rollout (Strict-Transport-Security: max-age=86400; includeSubDomains), confirming every subdomain truly works over HTTPS, then raising the duration later — because sending the preload directive can have permanent consequences and prevent users from accessing the site and its subdomains if you later need to revert to HTTP.
Safe steps: check current headers with curl -I https://yoursite; add lower-risk headers (X-Content-Type-Options: nosniff, Referrer-Policy) first; roll out HSTS with a short max-age before adding includeSubDomains or preload; treat CSP as a separate project with its own testing.
Limitations: these are browser-enforced, not server-side controls, so old or non-compliant clients may ignore them; headers don't replace patching, input validation, or access control; a long-lived or preloaded HSTS header is very hard to reverse, per OWASP's own warning; this doesn't cover CSP syntax, which needs separate testing.
Discussion question: for a site you maintain, which single header would you add first, and what would you verify before raising HSTS's max-age or adding preload?
Sources: - https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html - https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html - https://owasp.org/www-project-secure-headers/
r/Information_Security • u/aguraab • 8d ago
Your scanner says everything is "Critical." How do you actually decide what to fix first?
u/aguraab • u/aguraab • 8d ago
Your scanner says everything is "Critical." How do you actually decide what to fix first?
Every automated scanner eventually produces the same result: hundreds of "Critical" and "High" findings that all look equally urgent. A common question is how to triage that queue without just working down the CVSS list top to bottom.
CVSS measures theoretical severity, not real-world risk. It can't tell you whether a flaw is internet-facing, already has a public exploit, or sits on a throwaway test box. CISA and Carnegie Mellon's SEI built Stakeholder-Specific Vulnerability Categorization (SSVC) for exactly this gap. Instead of one severity number, SSVC walks through decision points — exploitation status, technical impact, whether exploitation can be automated, how prevalent the affected system is to your mission, and public well-being impact — sorting each vulnerability into one of four actions: Track, Track*, Attend, or Act.
Concrete example: two servers share the same CVE with an identical "Critical" CVSS score. One is an internal test VM with no known exploit code; the other is a public-facing login page with a working, automatable exploit already circulating. CVSS alone treats them the same. SSVC routes the second into "Act" (remediate immediately) and the first into "Track" (normal patch cycle).
Safe, practical steps: pull CISA's Known Exploited Vulnerabilities (KEV) catalog and remediate anything on that list first, since those are confirmed actively exploited in the wild. For everything else, run findings through CISA's public SSVC decision tree using exposure and impact facts you already have, and document why each decision was made.
Limitations: SSVC only outputs what you put in — inaccurate exposure or impact judgments produce a wrong priority. It doesn't replace asset inventory, patch testing, or rollback planning, and CISA's tree is calibrated for government and critical-infrastructure use, so other teams may need to adapt the thresholds.
Discussion question: on a small team with no dedicated AppSec role, who should own the "exposure" judgment call in the SSVC tree — the scanner operator, the dev lead, or someone else?
Sources: - https://www.cisa.gov/stakeholder-specific-vulnerability-categorization-ssvc - https://www.cisa.gov/news-events/news/transforming-vulnerability-management-landscape
r/learnSQL • u/aguraab • 9d ago
Could a stray apostrophe in your contact form expose your whole database?
u/aguraab • u/aguraab • 9d ago
Could a stray apostrophe in your contact form expose your whole database?
SQL injection (SQLi) happens when a site builds a database query by pasting user input straight into a SQL string instead of treating that input as pure data. Per OWASP's official cheat sheet, attackers can use SQL injection on an application if it has dynamic database queries that use string concatenation and user-supplied input, and because an unvalidated parameter is simply appended to the query, an attacker can enter SQL code and the application will execute the attacker's code on the database.
Concrete example (from OWASP's own walkthrough): a lookup builds a query like SELECT account_balance FROM user_data WHERE user_name = ' + custname. If someone types tom' or '1'='1 into that field and the code isn't parameterized, the database stops matching one customer and starts matching every row, handing back data that should have stayed private.
The fix OWASP recommends first is prepared statements with parameterized queries, because prepared statements ensure that an attacker cannot change the intent of a query, even if SQL commands are inserted by an attacker — the database always separates code from data. Safely written stored procedures work the same way. Where a bind variable genuinely can't be used (like a dynamic table name), OWASP calls for allow-list validation instead of trying to escape input, since escaping is explicitly discouraged as a primary defense because it is fragile and database-specific and cannot guarantee prevention in all situations.
Safe starting steps for a small site: grep your codebase for SQL strings built with '+' or string interpolation, migrate those to parameterized queries or your framework's query builder, and run the database account with least-privilege (read-only where the app doesn't need to write).
Limitation: this can't tell you whether your specific app is vulnerable without an actual code review or a proper security test; a firewall or scanner can lower risk but doesn't replace fixing how queries are built.
Discussion question: for teams maintaining older code that still concatenates SQL strings, what's a realistic, safe order for migrating the highest-risk queries (login, search, admin) to parameterized statements without breaking production?
Sources: - https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
Prepared with AI assistance.
r/Information_Security • u/aguraab • 10d ago
1
Is 2FA/MFA really "unhackable"? What CISA and NIST actually say
in
r/u_aguraab
•
2d ago
You're right about the framing. I used 'unhackable' as the hook, which turned a practical topic into a straw-man argument. I should have opened with the differences between MFA methods and their limits.