Website Penetration Testing : Protecting Online Assets – ITU Online IT Training
Website Pentesting

Website Penetration Testing : Protecting Online Assets

Ready to start learning? Individual Plans →Team Plans →

Website Penetration Testing: A Complete Guide to Protecting Online Assets

Heather is in the middle of performing a penetration test when her client asks her to check one more server. The right answer is not technical; it is procedural. Before she touches the additional system, she needs written approval that expands the scope or authorizes the extra task, because website penetration testing only stays safe, legal, and useful when the scope is explicit.

Featured Product

CompTIA Pentest+ Course (PTO-003) | Online Penetration Testing Certification Training

Discover essential penetration testing skills to think like an attacker, conduct professional assessments, and produce trusted security reports.

Get this course on Udemy at the lowest price →

This guide explains how to how to pentest a website in a structured way, from pre-engagement through reporting and retesting. It also answers the practical question behind the scenario: what document does she need before performing the additional task? In most engagements, that means a revised rules of engagement, updated scope document, or other written authorization that clearly includes the new server.

Websites are attractive targets because they process logins, payments, customer records, proprietary content, and internal business workflows. A single weak upload form or exposed admin panel can turn into account takeover, data theft, or service disruption. The goal of a penetration test is to find those problems before an attacker does, then hand the owner a clear path to fix them.

A website pentest is not just vulnerability scanning. It is a controlled simulation of real attack paths, paired with validation, evidence, and remediation guidance that the business can actually use.

If you want a practical view of how to perform penetration testing on a website, start with the workflow below. It reflects the way experienced testers approach web assessments: define scope, collect intelligence, test safely, validate findings, document impact, and verify remediation.

Pre-Engagement Interactions: Setting the Rules of the Test

Pre-engagement is the part most teams rush past, and it is the part that prevents the biggest mistakes. Before any packet is sent or form is submitted, the tester, client, and stakeholders need a shared understanding of what is allowed, what is off limits, and who to contact if something breaks. The pre-engagement interaction is the foundation of a safe, defensible engagement.

This is where you establish communication expectations, approval chains, and emergency procedures. It is also where you define whether the test is black box, gray box, or white box, and whether the client expects operational awareness during testing. That matters because a production site can react badly to aggressive scanning, and a business may want to pause the test if customer impact appears likely.

Note

The practical answer to the client’s “check this additional server too” request is simple: do not proceed until the change is documented and approved. A verbal okay is not enough when scope, liability, and downtime are on the line.

For formal guidance, security teams often align testing with the NIST Computer Security Resource Center and the OWASP Web Security Testing Guide. Those references do not replace contract language, but they help define professional testing expectations and technical boundaries.

What belongs in pre-engagement

  • Stakeholder list with named contacts for technical, legal, and business escalation.
  • Rules of engagement that define approved tools, time windows, and prohibited actions.
  • Scope document listing websites, subdomains, APIs, accounts, IP ranges, and excluded assets.
  • Testing timeline with blackout periods, maintenance windows, and reporting deadlines.
  • Communication plan for critical findings, outages, and suspected incidents.

Why this matters: when things go wrong, pre-engagement paperwork is the difference between a controlled test and a legal mess. If you are working under a formal contract, make sure the authorization covers both the existing target and any new systems added later.

Scope Definition: What Is In and What Is Out

Scope is the line between a useful assessment and accidental exposure. A website pentest should define exactly which hosts, subdomains, applications, APIs, and user roles are included. It should also say what is excluded, especially third-party processors, partner portals, and production-critical systems that could be disrupted by testing.

A good scope document answers questions that testers run into immediately. Can they test the payment workflow? Are they allowed to attack the staging environment? Is the mobile API in scope? Can they use the admin account the client provided, or only standard user credentials? The more precise the scope, the fewer assumptions the tester has to make.

Scope also covers operational constraints. Some sites allow only low-rate scanning. Others require IP allowlisting or a test window after hours. Many engagements use test accounts so the tester can explore role-based access controls without touching real customer data. Those details are not administrative fluff; they directly affect what the tester can safely verify.

Retail website Usually includes storefront, login, cart, checkout, and customer profile functions, but excludes the live payment processor unless the contract explicitly includes it.
SaaS dashboard Often includes tenant isolation, admin features, API endpoints, and invitation flows, with strict limits on destructive actions or bulk exports.
Public corporate site Commonly focuses on content management, contact forms, file uploads, and hidden admin paths, while excluding unrelated internal applications.

The CIS Critical Security Controls and the NIST Cybersecurity Framework both reinforce the value of asset clarity and governance. If an asset is not explicitly authorized, treat it as out of bounds until the client expands scope in writing.

Penetration testing is a technical service, but it lives or dies on documentation. Before testing starts, the client should have signed contracts, non-disclosure terms if required, and written authorization that names the assets and dates. That paperwork protects both sides if traffic is misread, a service becomes unstable, or an investigation later asks why a tester touched a system.

Documentation should also cover emergency contacts and escalation paths. If a login portal starts timing out or a database-backed search feature becomes slow, the tester needs a way to notify someone immediately. If there is no agreed contact, the tester may keep going and make a small problem bigger. That is exactly what good documentation is designed to prevent.

Many organizations use e-signature workflows to speed up approvals, and tools such as DocuSign can help move the legal review step along without sacrificing control. The tool is not the point; the point is that authorization exists before testing begins.

Warning

Do not rely on email threads, chat messages, or “go ahead” comments as your only permission. If the scope changes, get it documented. If the client wants the extra server tested, update the authorization first.

For teams that work in regulated environments, documentation may also need to support audit trails aligned with ISO/IEC 27001 or internal risk controls. That is especially important when reports are reviewed by legal, compliance, or executive stakeholders later.

Information Gathering: Building the Target Profile

Information gathering is where a tester learns what the site looks like from the outside before interacting with it directly. This can be passive, such as reviewing DNS records, public certificates, search engine results, and source code comments, or active, such as requesting pages and observing headers, redirects, and error messages. The purpose is simple: build a target profile that helps you test efficiently without guessing.

Attackers and testers often use the same discovery methods, but they use the results differently. A tester uses discovery to confirm legitimate exposure and assess business risk. An attacker uses discovery to find an opening. That is why public data matters so much. A forgotten staging host, a test login page, or an exposed backup file can reveal more than the main site ever will.

Useful intelligence includes subdomains, email patterns, cloud assets, documentation leaks, file paths, JavaScript references, and metadata embedded in documents. A login portal on a hidden subdomain may indicate a separate authentication stack. A response header may reveal a framework version. A certificate transparency log may show hostnames that were never linked from the website. These details shape the rest of the test.

If you are learning how to pentest a website, this stage is where you avoid wasting time. Knowing that the site uses a specific CMS, CDN, or identity provider lets you focus on realistic risks instead of throwing random checks at the target.

Examples of useful findings

  • Login portals on forgotten subdomains.
  • Staging environments with weaker controls than production.
  • Leaked metadata in documents that exposes usernames or internal paths.
  • JavaScript references to API endpoints, feature flags, or admin functions.
  • DNS and certificate clues that show the real attack surface is larger than the homepage suggests.

The OWASP community and the MITRE knowledge base are useful references for turning these clues into test hypotheses. The objective is not to collect trivia. The objective is to find the parts of the application that are worth deeper validation.

Planning and Reconnaissance: Turning Data Into a Test Strategy

Once the target profile is built, the next step is planning. This is where the tester decides what to prioritize, what to ignore for now, and which trust boundaries matter most. A good test strategy uses collected intelligence to focus on login flows, file upload features, search functionality, password reset workflows, and admin panels because those areas often carry the highest risk.

Planning is also where you connect technical findings to business context. A marketing site with no authentication is a different problem from a customer portal that exposes invoices and personal data. A vulnerable contact form may be annoying on a brochure site, but the same issue in a payment-related application could create a much larger legal and operational problem.

Tools like Trello can help organize hypotheses, findings, and next steps. A simple board with columns such as “Potential Risk,” “Validated,” “Needs Retest,” and “Resolved” gives the tester a clean workflow. This is especially helpful when a pentest runs across multiple days and the evidence pile starts to grow.

Good recon turns a broad target into a small number of high-value attack paths. That is the difference between a noisy test and a productive one.

How to prioritize targets

  1. Identify sensitive functions such as authentication, file upload, search, and account management.
  2. Map trust boundaries between guest users, regular users, moderators, and administrators.
  3. Review supporting systems like APIs, third-party integrations, and identity providers.
  4. Rank likely impact based on data sensitivity, privilege level, and business dependence.

The NIST Information Technology Laboratory and FIRST both emphasize structured handling of security findings. Planning is where that structure starts paying off in the field.

Reconnaissance Techniques and Tooling

Reconnaissance is the phase where the tester uses tools and observation to understand the website’s surface area. Passive recon avoids touching the target aggressively. Active recon interacts with the application, but in a controlled way. The distinction matters because some clients want minimal noise, while others allow broader discovery as long as it stays within agreed limits.

OWASP ZAP and Maltego are often used for different parts of this work. ZAP helps observe site structure, requests, responses, and spiderable content. Maltego is better for relationship mapping, especially when you want to connect domains, people, infrastructure, and public records into a single view. Neither tool magically finds a vulnerability on its own. They help you see what is already there.

Response headers can reveal server software, caching layers, security controls, or reverse proxies. DNS records can show subdomains, mail systems, or cloud services. Certificate transparency logs can surface hostnames that were issued valid certificates long before anyone linked them from a page. A forgotten subdomain might host an old app that still accepts logins. A cloud-hosted asset may point to storage or API infrastructure that was never intended to be publicly discoverable.

Pro Tip

Start recon with the least intrusive methods first. If you can build a strong map from DNS, certificates, headers, and public pages, you will waste less time and trigger fewer alerts later.

For official guidance on application testing concepts, the OWASP Web Security Testing Guide remains one of the most practical references available.

Scanning and Enumeration: Finding the Attack Surface

Scanning is the process of identifying likely vulnerabilities, outdated components, and misconfigurations. In web testing, that usually means checking the application layer and any supporting infrastructure that the site depends on. Nessus and OWASP ZAP are commonly used here because they can help surface known issues faster than manual inspection alone.

Scanning is not the same as enumeration. Scanning looks broadly for weak spots. Enumeration is narrower and more deliberate. It is the process of learning what users, directories, parameters, services, or application states exist. A broad scan might tell you that a server has a problem. Enumeration tells you where to aim next.

Balance matters. A noisy scan can overwhelm a fragile site or trigger security monitoring. A targeted scan may miss dormant risks. The best testers tune speed, concurrency, and timing to the environment. On a small business site, that may mean slow and careful. On a staging copy with explicit permission, it may mean broader coverage.

What this phase should uncover

  • Known vulnerabilities in frameworks, plugins, or server components.
  • Directories and hidden paths that expose admin or test interfaces.
  • Parameters and endpoints that are worth manual testing.
  • Weak configuration patterns like verbose error handling or missing security headers.

For context, web application risks often map to the OWASP Top 10. That list is not a script, but it gives testers and defenders a common vocabulary for the most repeated classes of failure.

Enumeration of Users, Content, and Configurations

Enumeration is where the attacker’s playbook and the defender’s validation work intersect. It can reveal usernames, hidden directories, exposed admin pages, debug endpoints, and misconfigured services. The value of enumeration is not in the discovery alone. It is in how that discovery narrows the attack path.

Many sites leak information through normal behavior. A password reset flow may reveal whether a username exists. A 403 response may expose that a directory is real but access-controlled. An error page may print a file path, a database table name, or a framework version. File discovery can also uncover backup files, test artifacts, or old documentation that should never have been public.

One common example is username discovery. If the site returns different messages for “account not found” and “password incorrect,” that difference may allow account enumeration. Another example is directory brute-forcing against predictable content paths such as /admin, /backup, /dev, or /old. Even when a site does not list those paths, the server may still respond to them.

For testers who want to understand how to perform penetration testing on a website in a realistic way, this stage is essential. It helps you choose attack paths that reflect actual exposure instead of theoretical weakness.

Enumeration is often the step that turns a vague suspicion into a concrete test case.

The CISA guidance library is useful here because it often reinforces simple but high-impact defensive practices around exposure reduction and secure configuration.

Vulnerability Validation: Confirming What Is Real

Scan results are only useful if they are real. False positives happen constantly in website testing, especially when a scanner flags an issue based on version strings, response patterns, or partial input. Validation is the process of confirming that a suspected flaw actually exists and is exploitable under the agreed conditions.

Good validation is careful. It does not mean firing off destructive payloads or dumping large amounts of data. It means checking the behavior of the application in a controlled way, collecting repeatable evidence, and understanding whether the issue is a real risk or just a noisy finding. For example, if a scanner suspects SQL injection, the tester may compare request behavior, inspect server responses, and verify whether input handling changes in a meaningful way.

Evidence matters because it supports both remediation and retesting. Screenshots, request and response pairs, timestamps, and notes about exact parameters help the client reproduce the issue later. If the finding is disputed, the evidence becomes the record. If the issue is fixed, the evidence becomes the baseline for regression testing.

Key Takeaway

Never report a vulnerability just because a scanner said so. Validate it, prove it carefully, and document exactly how you confirmed it.

For web testing methodology, OWASP remains the most widely used technical reference, while NIST provides a strong governance model for tracking and responding to findings.

Common Website Vulnerability Classes to Test

A strong website pentest covers the problems that show up over and over again in real applications. Injection flaws include SQL injection, command injection, and cross-site scripting. These issues happen when user input reaches a sensitive interpreter without enough validation or context-aware escaping. The result can be stolen data, unauthorized actions, or malicious content running in the browser.

Broken authentication includes weak password handling, predictable reset flows, insecure session management, and poor token protection. If session cookies are not protected correctly or account recovery is too easy to abuse, an attacker may take over an account without ever knowing the user’s password. That risk is especially serious in portals that expose billing, support, or administrative actions.

Access control failures are just as dangerous. A user should not be able to view another customer’s invoice, modify a hidden API object, or trigger admin-only functions. This is where horizontal and vertical privilege checks matter. If the application checks authentication but not authorization, the gate is open after login.

Additional risk areas to review

  • Insecure file upload handling that allows dangerous file types or content execution.
  • Sensitive data exposure through logs, backups, error pages, or unencrypted transport.
  • Security misconfiguration such as verbose errors, weak headers, and default settings.
  • CSRF and session issues that let a user’s browser be manipulated into unwanted actions.

The OWASP Top 10 and NIST SP 800-218 are practical references for mapping common web weaknesses to secure development and review priorities.

Exploitation and Proof of Concept: Demonstrating Impact Safely

In a professional pentest, exploitation is about proof, not destruction. The goal is to show that a vulnerability has real business impact while staying inside the approved scope and causing as little disruption as possible. A proof of concept should answer the client’s real question: what can an attacker actually do with this weakness?

A controlled demonstration might show limited data access, unauthorized privilege verification, or a small request manipulation that proves logic abuse. For example, if a user can alter an object identifier and see another record, the tester does not need to export the database to prove the issue. A minimal, repeatable example is usually stronger than a dramatic one because it is easier to verify and safer to reproduce.

The same principle applies to web application testing tools and manual work. Use the least invasive method that demonstrates impact clearly. If a request can prove unauthorized access with a single record, there is no reason to expand that into bulk extraction. Responsible testers stop at the point where the finding is proven.

The OWASP ecosystem and vendor documentation from Microsoft Learn or other official sources are useful for understanding defensive patterns after the concept is proven.

Post-Exploitation Considerations

Post-exploitation is where testers think like an attacker without acting like one. Once access is achieved, the next question is not “how far can I go?” It is “what would this mean in a real compromise?” That distinction matters. The value of post-exploitation is in understanding blast radius, not in expanding it for sport.

In a web context, post-exploitation may reveal whether a low-privilege account can reach admin functions, whether credentials can access other applications, or whether sensitive business data is reachable from the compromised role. If the application is part of a larger ecosystem, the findings may show risk of lateral movement across connected services, shared identity systems, or administrative consoles.

Restraint is critical. Unless the client explicitly authorizes persistence, destructive testing, or deeper intrusion simulation, the tester should avoid those actions. A clean pentest documents what could happen, not everything that might be technically possible. That keeps the engagement ethical, repeatable, and defensible.

Government and industry references such as the CISA advisories and the NIST Cybersecurity Framework help organizations translate technical compromise into business risk categories.

Reporting and Communication: Turning Findings Into Action

A pentest is only useful if someone can act on the results. That makes reporting one of the most important phases of the entire engagement. A strong report should not just say what was found. It should explain the affected asset, the severity, the business impact, the evidence, and the remediation path. If a report cannot be understood by both executives and engineers, it will slow down remediation.

Good reports separate the story from the instructions. Executive readers need a clear risk summary: what could happen, how likely it is, and why it matters. Technical teams need the details: the endpoint, the parameter, the reproduction steps, and the proof. Critical findings should be communicated immediately during the engagement, not only at the end, especially if the issue could lead to account takeover or data exposure.

When a tester communicates well, the report becomes a work plan instead of a PDF that sits in a folder. That means using precise language, avoiding exaggeration, and linking each issue to a real remediation path. It also means ranking findings in a way that reflects actual business exposure, not just scanner severity.

Clear reporting is the bridge between technical discovery and reduced risk. Without it, even a perfect pentest can fail.

The BLS Occupational Outlook Handbook provides useful context on cybersecurity work demand, which helps explain why organizations invest in assessments and follow-up remediation.

Remediation Guidance and Verification

Remediation is where the client gets value from the test. A useful pentest report translates each issue into practical fixes such as patching, input validation, stronger authorization checks, secure configuration, and better secrets handling. If the weakness came from code, the fix may require a developer change. If it came from infrastructure or defaults, the fix may be a configuration update or a hardened baseline.

Secure development practices matter because many web vulnerabilities are not one-time mistakes. They come from patterns: trusting input too early, checking permissions in the wrong layer, or leaving old endpoints exposed. A good remediation plan often includes both the direct fix and the process fix. For example, if an upload flaw existed because file type validation happened only in the browser, the solution is not just a server-side check. It is also a code review rule that prevents that mistake from returning.

Retesting is part of the job. After the client applies the fix, the tester should verify that the issue is closed and that the change did not create a new problem. Regression testing matters because a patch that solves one endpoint can accidentally break another route or leave the same weakness in a different feature.

Pro Tip

Ask for retest windows in the original engagement plan. It saves time later and makes it easier to prove that remediation actually reduced risk.

For secure coding and verification guidance, Microsoft Learn and the OWASP Cheat Sheet Series are solid references for defensive implementation patterns.

Tools and Workflow Tips for Efficient Website Pentesting

The best toolkit is the one that matches the scope and the tester’s skill level. Documentation tools such as Microsoft Word or Google Docs help record scope, notes, and report drafts. Trello is useful for tracking hypotheses and remediation status. TheHarvester and Shodan help with discovery and external asset visibility. OWASP ZAP supports web traffic inspection and spidering. Maltego helps map relationships. Nessus is useful for broader vulnerability checks on the supporting environment.

Each tool has a job. None of them replaces judgment. A skilled tester uses tools to speed up evidence collection and reduce repetitive work, but still validates findings manually. That prevents overreliance on noisy output and keeps the assessment aligned with the client’s actual risk.

Workflow discipline matters as much as the toolset. Label evidence clearly. Track findings by severity. Save exact request and response pairs. Separate confirmed issues from suspected ones. If a site has multiple environments, tag each note with production, staging, or test so nothing gets mixed up. Small habits like these save hours when you write the final report.

Practical workflow habits

  • Use one evidence folder per finding to keep screenshots and notes organized.
  • Record timestamps so results can be reproduced later.
  • Tag the environment to avoid mixing staging and production evidence.
  • Track severity first so critical issues do not get buried behind minor ones.
  • Adapt tool noise to the target so scanning does not outpace the client’s tolerance.

The Verizon Data Breach Investigations Report is a useful reminder that web-facing systems remain a common entry point, which is why careful workflow and documentation still matter.

How to Think About Website Pentesting in Real Projects

One of the most common mistakes in website penetration testing is treating it like a checklist. Real projects do not work that way. A retail site, a SaaS portal, and a public corporate site may all have login pages, but the risk is different in each case. The tester has to adapt the approach based on data sensitivity, user roles, architectural complexity, and how the business actually uses the application.

This is also where the client’s request to expand testing becomes important again. If a new server, subdomain, or API is added mid-engagement, the test is no longer the same test. That means new authorization, updated scope, and possibly new test windows. The right process protects both the tester and the client from scope creep and accidental damage.

If you are learning how to penetration test a website for the first time, focus on the sequence rather than the tools. First define what is allowed. Then learn what exists. Then confirm what matters. Finally, explain the risk in a way the business can act on. That is the workflow professionals use because it works.

Featured Product

CompTIA Pentest+ Course (PTO-003) | Online Penetration Testing Certification Training

Discover essential penetration testing skills to think like an attacker, conduct professional assessments, and produce trusted security reports.

Get this course on Udemy at the lowest price →

Conclusion

Website penetration testing is a controlled process for finding web risks before attackers exploit them. The lifecycle is straightforward: define scope, get written authorization, gather intelligence, plan the test, recon the target, scan and enumerate carefully, validate findings, demonstrate impact safely, and report in a way the client can use.

That same lifecycle answers the opening scenario. If Heather is asked to check an additional server while already testing another target, she needs updated written authorization before she proceeds. A revised scope document or rules of engagement is not just paperwork. It is the proof that the extra task is approved and understood.

Strong web security does not come from one pentest. It comes from regular testing, secure development, configuration hardening, and follow-up verification every time the site changes. New features bring new risk. Retesting confirms that fixes work. Continuous improvement keeps the application from drifting back into the same problems.

If your team is building a web security program, use this guide as your working checklist. Keep the scope tight, document everything, validate carefully, and close the loop with remediation and retesting. That is how online assets stay protected.

CompTIA®, Microsoft®, AWS®, ISC2®, ISACA®, and PMI® are trademarks of their respective owners.

[ FAQ ]

Frequently Asked Questions.

Why is scope definition important in website penetration testing?

Scope definition is crucial in website penetration testing because it clearly outlines which systems, applications, and network segments are authorized for testing. Without a defined scope, testers risk accessing unauthorized areas, which could lead to legal issues or unintended service disruptions.

Having an explicit scope ensures that all testing activities stay within agreed boundaries, preserving the legality and ethics of the process. It also helps prioritize testing efforts and allocate resources effectively, making the process more efficient and targeted.

What are the key steps involved in conducting a website penetration test?

The key steps in website penetration testing include planning, reconnaissance, scanning, gaining access, maintaining access, and analysis/reporting. Initially, the tester defines the scope and objectives, then gathers information about the target.

Subsequently, they identify vulnerabilities through scanning and manual testing, attempt to exploit these vulnerabilities ethically, and establish persistent access if possible. Finally, detailed reports are prepared, outlining findings, risks, and remediation recommendations to improve the website’s security posture.

What are common misconceptions about website penetration testing?

One common misconception is that penetration testing is a one-time activity rather than an ongoing process. Another is that it guarantees complete security, which is not true; it identifies vulnerabilities but does not eliminate all risks.

Many also believe that only large organizations need penetration testing, but any website handling sensitive data benefits from regular testing. It’s important to understand that testing should be part of a comprehensive security strategy, not a standalone fix.

How can organizations ensure penetration testing remains legal and ethical?

Legal and ethical penetration testing requires explicit written authorization from the owner of the systems being tested. This scope of work should detail which assets are included and the testing methods permitted.

Organizations should also establish clear communication channels and document all activities. Using qualified professionals who adhere to industry standards and ethical guidelines ensures that testing remains lawful and responsible, avoiding legal repercussions or damage to reputation.

What best practices should be followed after completing a website penetration test?

After completing a penetration test, organizations should review the detailed report, prioritize vulnerabilities based on risk levels, and implement remediation strategies promptly. Conducting re-tests after fixes ensures that vulnerabilities are effectively addressed.

Additionally, integrating regular penetration testing into the security lifecycle helps maintain a proactive defense. Keeping up with the latest security trends and continuously updating security measures ensures ongoing protection of online assets.

Related Articles

Ready to start learning? Individual Plans →Team Plans →
Discover More, Learn More
CompTIA CNVP Stack : Become a Network Vulnerability Assessment Professional Discover how to become a network vulnerability assessment professional and enhance your… Have I Been Pwned? : A Guide to Online Security Learn how to check, respond to, and prevent data breaches to protect… Unveiling the Art of Passive Reconnaissance in Penetration Testing Discover how passive reconnaissance helps ethical hackers gather critical information silently, minimizing… Cybersecurity Uncovered: Understanding the Latest IT Security Risks Discover key cybersecurity risks related to writeback cache and storage vulnerabilities to… A Guide to Mobile Device Security Discover essential mobile device security practices to protect your data, accounts, and… Understand And Prepare for DDoS attacks Learn how DDoS attacks work and gain strategies to protect your business…
FREE COURSE OFFERS