Secure Systems, Applications and Cloud EnvironmentsIntroductionCybersecurity is not achieved by a single firewall, antivirus product, or encryption algorithm. It is achieved through the coordinated protection of operating systems, applications, endpoints, networks, data, identities, and cloud services. A weakness in any one of these areas can undermine the security of the whole environment. For example, a perfectly configured cloud database may still be compromised if an application exposes credentials, an operating system remains unpatched, or an administrator account lacks multi-factor authentication. This chapter examines practical controls for securing systems and applications. It focuses on operating-system hardening, patch and vulnerability management, secure configuration, backups, endpoint protection, secure software development, and risks affecting web applications, APIs, mobile devices, IoT systems, and cloud environments. It also introduces the shared-responsibility model, which clarifies which security tasks belong to a cloud provider and which remain the customer’s responsibility. Security controls should be selected according to risk. A control is useful only when it reduces the likelihood or impact of an unwanted event without creating unacceptable operational or legal problems. Security must therefore be considered a continuous process involving prevention, detection, response, recovery, governance, and improvement. Learning ObjectivesAfter completing this chapter, a learner should be able to: - explain the purpose of operating-system hardening and secure configuration;
- describe patch, vulnerability, backup, and endpoint-protection practices;
- identify common risks in web applications, APIs, mobile systems, and IoT environments;
- apply secure-development principles to software projects;
- explain the cloud shared-responsibility model;
- evaluate a practical security scenario and recommend proportionate controls;
- discuss operational, ethical, privacy, and governance considerations.
1. Security as a System PropertyA system is secure when its confidentiality, integrity, availability, authenticity, and accountability requirements are appropriately protected. These properties are often called the CIA triad plus related assurance properties. Confidentiality prevents unauthorised disclosure. Access controls, encryption, data classification, and privacy controls support confidentiality. Integrity protects information and system behaviour from unauthorised alteration. Hashes, digital signatures, access restrictions, and change control support integrity. Availability ensures that authorised users can access services when required. Redundancy, backups, capacity planning, monitoring, and disaster recovery support availability. Authenticity provides confidence that a user, device, service, or message is genuine. Authentication mechanisms and certificates are examples. Accountability makes actions traceable through reliable logging, identity management, and time synchronisation. Security is also a lifecycle. A system may be secure during deployment but become vulnerable after software changes, expired certificates, new threats, misconfigured permissions, or abandoned accounts. Secure operations therefore require continuous asset discovery, risk assessment, monitoring, maintenance, and review. 2. Operating-System HardeningOperating-system hardening is the process of reducing unnecessary exposure and strengthening the configuration of a host. Hardening does not make a system invulnerable; it reduces attack surface and limits the consequences of compromise. 2.1 Asset and service inventoryAn organisation should know which hosts exist, who owns them, what software they run, where they are located, and what business services depend on them. An unknown or unmanaged system cannot be reliably patched or monitored. An inventory should include servers, workstations, virtual machines, containers, cloud instances, mobile devices, and specialised appliances. Services and ports should be reviewed against business requirements. Unused services should be removed or disabled, and administrative interfaces should not be exposed broadly to the internet. Management access should generally be restricted through protected networks, virtual private networks, bastion hosts, or identity-aware access controls. 2.2 Least privilege and account securityLeast privilege gives users, processes, and services only the permissions necessary for their legitimate tasks. Administrative accounts should be separate from ordinary user accounts. Shared accounts should be avoided because they weaken accountability. Dormant, default, and terminated-user accounts should be disabled promptly. Strong authentication is particularly important for privileged access. Multi-factor authentication combines independent factors such as something known, something possessed, and something inherent. Password policies should encourage long, unique passwords and should be supported by password managers, breached-password screening, rate limiting, and secure recovery procedures. Excessively complex rotation rules can cause predictable password reuse; policy should be based on risk and current guidance. 2.3 Secure configurationSecure configuration includes host firewalls, secure remote administration, correct file permissions, safe logging, time synchronisation, malware protection, and removal of insecure protocols. Configuration should be documented and preferably enforced through automation. Baselines may be developed from vendor guidance, recognised benchmarks, and organisational requirements. Configuration drift occurs when systems gradually diverge from their approved state. Drift may result from emergency changes, manual administration, software installation, or incomplete automation. Configuration-management tools and periodic compliance scans help detect it. A secure baseline should be version-controlled, tested, approved, and reviewed after significant changes. 2.4 Logging and monitoringLogs should record relevant security events such as authentication failures, privilege changes, software installation, configuration changes, and access to sensitive resources. Logs should be protected from unauthorised modification and sent to a central system where feasible. Time synchronisation is important because investigators need to correlate events across hosts. Logging must be proportionate. Collecting excessive personal information may create privacy risks and storage costs. Organisations should define retention periods, access permissions, alert thresholds, and procedures for investigating suspicious events. 3. Patch and Vulnerability ManagementA vulnerability is a weakness that can be exploited to violate a security requirement. Patch management is the controlled process of identifying, testing, approving, deploying, and verifying updates. Updates may fix vulnerabilities, improve reliability, or add functionality. A mature patch process includes: - Discovery: identify assets, software versions, ownership, and exposure.
- Assessment: determine whether a vulnerability affects the organisation and how serious it is.
- Prioritisation: consider exploit availability, internet exposure, asset criticality, data sensitivity, and compensating controls.
- Testing: assess compatibility in representative environments.
- Deployment: apply updates using a controlled and documented process.
- Verification: confirm installation and service health.
- Exception management: document systems that cannot be patched and apply alternatives such as isolation, access restriction, or increased monitoring.
A vulnerability score alone should not determine priority. A moderate technical weakness on an exposed payment server may deserve faster action than a severe weakness on an isolated laboratory system. Risk is contextual. Worked application: patch prioritisationSuppose an organisation identifies three vulnerabilities: | Asset | Exposure | Business importance | Exploit status | Sensible priority |
|---|
| Public web server | Internet-facing | High | Exploit observed | Immediate | | Internal reporting workstation | Restricted network | Medium | No known exploit | Scheduled | | Isolated test machine | No production data | Low | No known exploit | Low, with review |
The table does not replace technical analysis, but it demonstrates why patch decisions should combine technical severity with exposure and business impact. Unsupported operating systems and applications present special risk because vendors may no longer provide security fixes. Replacement, upgrade, isolation, or compensating controls should be planned rather than allowing unsupported technology to become permanent. 4. Backups, Recovery, and ResilienceBackups are copies of data or system state maintained so that information can be restored after accidental deletion, hardware failure, ransomware, or other incidents. A backup is not necessarily a recovery capability. Restoration must be tested, and dependencies such as identity services, encryption keys, software licences, and network connectivity must be considered. Important backup principles include: - maintain multiple copies;
- use more than one storage medium or environment;
- keep at least one copy logically or physically separated from production;
- protect backups with access controls and encryption;
- define retention periods and legal requirements;
- monitor backup jobs and investigate failures;
- test restoration regularly;
- protect backup administration with strong authentication.
Two recovery measures are especially useful. The recovery point objective (RPO) is the maximum acceptable amount of data loss measured in time. An RPO of four hours means that, under the recovery design, the organisation aims to lose no more than approximately four hours of transactions. The recovery time objective (RTO) is the target time for restoring a service after disruption. RPO concerns data currency; RTO concerns service restoration speed. For example, a payroll system with an RPO of one hour may require frequent replication or transaction backups. If its RTO is two hours, the organisation must also ensure that replacement infrastructure, procedures, credentials, and staff are ready within that period. These objectives are business decisions supported by technical design, not merely technical settings. 5. Endpoint ProtectionEndpoints include laptops, desktops, servers, mobile devices, and sometimes specialised operational equipment. Endpoint protection commonly combines anti-malware, host firewalls, application control, device encryption, vulnerability assessment, and endpoint detection and response (EDR). Traditional anti-malware relies heavily on signatures and known patterns. Modern endpoint tools also use behavioural analysis, reputation services, exploit prevention, isolation, and telemetry. These technologies can detect suspicious processes, unusual scripts, credential theft, or lateral movement, but they can produce false positives and should not be treated as infallible. Effective endpoint security also depends on operating procedures. Devices should be enrolled in management, encrypted where appropriate, configured with screen-lock policies, and updated automatically where safe. Removable media, local administrator rights, macros, scripting engines, and software installation should be controlled according to risk. Employees need clear procedures for reporting suspicious activity and lost devices. 6. Secure Application DevelopmentApplication security is strongest when integrated throughout the software development lifecycle rather than added immediately before release. A secure development lifecycle includes security requirements, threat modelling, secure design, coding standards, testing, deployment controls, and post-release monitoring. 6.1 Threat modellingThreat modelling asks what must be protected, who may attack it, how an attack could occur, and which controls reduce the risk. A team can identify trust boundaries, data flows, privileged operations, external dependencies, and abuse cases. Threat models should be updated when architecture or business requirements change. 6.2 Secure coding principlesImportant principles include: - validate input using allow-lists and appropriate data types;
- encode output according to its destination context;
- use parameterised queries rather than constructing database commands through string concatenation;
- enforce authorisation on the server, not only in the user interface;
- fail safely and avoid exposing sensitive diagnostic information;
- protect secrets through a secrets manager rather than source code;
- use approved cryptographic libraries and secure defaults;
- handle errors without revealing credentials, keys, or internal architecture;
- keep dependencies current and monitor their provenance.
Security testing may include static analysis, dynamic testing, dependency scanning, code review, penetration testing, and abuse-case testing. Automated tools are valuable but incomplete. A tool may miss business-logic flaws or report issues that are not exploitable in context. 7. Web Application and API RisksWeb applications commonly face failures of authentication, authorisation, input handling, session management, configuration, and dependency security. A particularly important distinction is between authentication—proving identity—and authorisation—deciding what an identified subject may do. An application must enforce object-level authorisation. For example, changing an invoice identifier in a request should not allow one customer to retrieve another customer’s invoice. Authorisation must be checked against the authenticated identity, resource ownership, role, tenant, and business rules. Common web risks include injection, cross-site scripting, cross-site request forgery, insecure direct object references, security misconfiguration, vulnerable components, and inadequate logging. Secure cookies should use appropriate attributes such as Secure, HttpOnly, and a suitable SameSite policy. Session identifiers should be unpredictable, protected in transit, rotated after authentication changes, and invalidated on logout or expiry. APIs expose structured interfaces used by browsers, mobile applications, partners, and automated services. API risks include excessive data exposure, weak rate limiting, broken object-level authorisation, poor token validation, replay, mass assignment, and inadequate inventory of old versions. APIs should define schemas, validate input, minimise returned data, authenticate callers appropriately, enforce authorisation at every relevant operation, and monitor abnormal use. Rate limiting is not a complete defence against abuse, but it can reduce automated guessing, scraping, and denial-of-service pressure. Limits should account for user identity, client, endpoint sensitivity, and legitimate traffic patterns. 8. Mobile and IoT SecurityMobile devices operate in varied networks and store valuable credentials, messages, location data, and business information. Controls include device encryption, secure lock mechanisms, mobile-device management, application vetting, secure update processes, remote lock or wipe, and separation of personal and organisational data where appropriate. Mobile applications should avoid storing sensitive information unnecessarily. Local data should be protected using platform security facilities, certificates should be validated correctly, and exported components should be restricted. Applications should not rely on a hidden client-side value as a secret because mobile software can often be inspected or modified. Internet of Things (IoT) devices introduce scale, physical exposure, limited processing power, long lifetimes, and supply-chain dependence. Risks include default passwords, insecure update mechanisms, unnecessary services, weak interfaces, poor vendor support, and inadequate network segmentation. Organisations should maintain an IoT inventory, change default credentials, isolate devices, restrict outbound communication, monitor behaviour, and verify how long security updates will be available before procurement. 9. Cloud Security and Shared ResponsibilityCloud computing provides on-demand access to computing resources, platforms, and applications. Common service models are infrastructure as a service (IaaS), platform as a service (PaaS), and software as a service (SaaS). The customer generally controls more of the environment in IaaS and less in SaaS, although responsibility never disappears. The shared-responsibility model divides duties between the provider and customer. The provider normally secures the underlying facilities, physical infrastructure, and core service platform. The customer remains responsible for areas such as identities, data classification, permissions, configurations, application code, and endpoint access. Exact boundaries vary by provider, service, contract, and deployment model. | Environment | Provider commonly manages | Customer commonly manages |
|---|
| IaaS | Facilities, hardware, core virtualisation | Guest OS, applications, identities, data, network rules | | PaaS | Facilities, hardware, operating platform | Application code, data, identities, configuration | | SaaS | Service infrastructure and application platform | Users, access, data governance, device security, configuration |
Cloud misconfigurations are a major source of incidents. Examples include public storage, overly broad identity permissions, exposed management interfaces, weak key handling, unmonitored activity, and insecure network rules. Cloud security should use least privilege, multi-factor authentication, separate administrative roles, policy-as-code where appropriate, encryption, central logging, continuous configuration assessment, and tested recovery procedures. Cloud does not remove the need for governance. Organisations must understand data location, contractual obligations, incident notification terms, subcontractors, deletion processes, audit evidence, and regulatory requirements. Vendor lock-in and service outage risks should also be considered in architecture and continuity planning. 10. Illustrative Case Study: Securing a Cloud-Based Retail PlatformBackgroundA fictional retailer operates an online store using a cloud-hosted application, a managed database, mobile applications, warehouse IoT scanners, and a third-party payment service. The company has grown rapidly and allows developers to deploy directly to production. ProblemA review discovers that one storage bucket is publicly accessible, several developers share an administrative account, an API returns more customer information than required, warehouse scanners use unchanged default credentials, and backups have never been restored in a formal test. The operating system of one virtual machine is also approaching end of support. AnalysisThe retailer faces confidentiality risks from public storage and excessive API responses. Shared administrative credentials weaken accountability and make compromise more damaging. Default IoT credentials create an easy entry point. The untested backups create uncertainty about recovery, while the unsupported operating system increases vulnerability and operational risk. These are not isolated technical defects: they reflect weak asset ownership, insufficient change control, and an incomplete shared-responsibility understanding. Approach and solutionThe security team first identifies assets and assigns owners. Public access to the storage bucket is removed, access policies are rewritten using least privilege, and sensitive data is encrypted. Administrative accounts are individualised and protected with multi-factor authentication. The API is changed to return only fields required for each function; object-level authorisation tests are added to the development pipeline. Warehouse devices are inventoried, default credentials are replaced, unnecessary services are disabled, and the devices are placed on a segmented network with restricted outbound access. The unsupported virtual machine is upgraded after testing, and its configuration is recorded as code. Backups are encrypted, access-controlled, monitored, and restored into a test environment. A recovery exercise measures whether business objectives can be met. The retailer introduces pull-request review, dependency scanning, secret detection, and a deployment approval process for high-risk changes. Central logging is enabled for cloud administration, authentication, storage access, and API activity. The incident-response plan is updated to include the cloud provider and payment-service provider. OutcomeThe immediate exposures are reduced, but the most important outcome is the creation of repeatable governance. Security checks become part of development and operations rather than a one-time audit. Management receives measurable evidence about patch compliance, backup restoration, privileged accounts, unresolved vulnerabilities, and cloud configuration drift. Learning points- Cloud providers do not secure customer configurations automatically.
- Identity and authorisation failures can be as serious as software vulnerabilities.
- Backups require restoration testing.
- IoT security depends on procurement, configuration, segmentation, and lifecycle planning.
- Secure development and secure operations must work together.
11. Governance, Ethics, and Professional PracticeSecurity professionals handle personal data, employee information, credentials, and investigative evidence. They must use authorised methods, protect confidentiality, maintain accurate records, and avoid unnecessary intrusion. Penetration testing requires written scope, permission, rules of engagement, and safe handling of findings. Privacy principles require purpose limitation, data minimisation, appropriate retention, transparency, and protection against unauthorised access. Logging and monitoring should not become unrestricted surveillance. Organisations should define who may access logs, why access is needed, and how misuse will be detected. Security decisions also involve accessibility and fairness. Multi-factor authentication, device controls, and automated fraud detection should be designed so that legitimate users are not unfairly excluded. Artificial intelligence may assist with anomaly detection, code analysis, alert triage, and vulnerability prioritisation, but its outputs require human review. Models can generate false positives, miss novel attacks, expose sensitive data, or reproduce biased assumptions. AI systems themselves require access control, secure data handling, testing, monitoring, and an accountable owner. 12. Limitations and Contemporary DevelopmentsNo control eliminates risk. Patching can cause compatibility failures; endpoint detection can be bypassed; backups can be encrypted or deleted by attackers; cloud services can fail; and secure code can be deployed with insecure permissions. Defence in depth is therefore essential. Current developments include zero-trust architectures, software bills of materials, memory-safe programming, confidential computing, passkeys, identity-aware network access, infrastructure as code, and automated security policy enforcement. These technologies can improve security, but implementation quality matters more than terminology. Zero trust, for example, is not a single product; it is a design approach based on explicit verification, least privilege, continuous assessment, and limited implicit trust. A practical security programme should measure meaningful outcomes rather than only counting tools. Useful indicators may include the proportion of assets inventoried, time to remediate high-risk vulnerabilities, privileged-account coverage by multi-factor authentication, successful backup-restoration tests, unsupported systems, unresolved critical findings, and time to detect and contain incidents. Metrics should support decisions and improvement rather than encourage concealment or superficial compliance. Best-Practice Checklist- Maintain an accurate asset and software inventory.
- Establish secure, documented, and automated configuration baselines.
- Remove unnecessary services and restrict management access.
- Apply least privilege and individual accountability.
- Protect privileged accounts with multi-factor authentication.
- Prioritise patches according to exposure, exploitability, and business impact.
- Encrypt and isolate backups, then test restoration.
- Deploy layered endpoint protection and monitor its alerts.
- Integrate threat modelling and security testing into development.
- Enforce server-side authentication and authorisation for every sensitive operation.
- Secure APIs with schemas, rate limits, minimal responses, and version management.
- Segment and securely update IoT devices.
- Understand provider and customer responsibilities in every cloud service.
- Monitor configuration drift, identity activity, and unusual behaviour.
- Review privacy, legal, contractual, and ethical requirements.
- Exercise incident response and recovery plans regularly.
Chapter SummarySecure systems require coordinated protection across operating systems, applications, endpoints, networks, identities, data, and cloud services. Operating-system hardening reduces attack surface through inventory, service reduction, least privilege, secure configuration, logging, and controlled administration. Patch management must combine technical severity with exposure and business impact. Backups support resilience only when they are protected, monitored, and restored successfully in exercises. Endpoint protection is strongest when technology is combined with management, encryption, updates, and user reporting. Secure application development begins with requirements and threat modelling and continues through secure design, coding, testing, deployment, and monitoring. Web and API security depend especially on correct server-side authorisation, safe input handling, secure sessions, minimal data exposure, and dependency management. Mobile and IoT systems require lifecycle planning, secure updates, device management, segmentation, and protection against default credentials. Cloud security follows a shared-responsibility model. Providers protect parts of the underlying service, while customers remain accountable for identities, configurations, data, applications, and access. Governance, privacy, ethics, human oversight, and tested recovery are essential because no technical control is perfect. Effective cybersecurity is therefore a continuous discipline of prevention, detection, response, recovery, and improvement. Key TermsAsset inventory: A record of systems, software, devices, owners, and business relationships. Attack surface: The collection of points through which a system may be attacked. Backup: A protected copy of data or system state used for restoration. Cloud shared responsibility: The division of security duties between a cloud provider and its customer. Configuration drift: Unplanned divergence from an approved system configuration. Endpoint detection and response (EDR): Technology that collects endpoint activity and supports detection and investigation. Hardening: Reducing exposure and strengthening a system’s configuration. Integrity: Protection against unauthorised alteration or destruction. Least privilege: Granting only the permissions necessary for an authorised task. Multi-factor authentication: Authentication using two or more independent factor types. Patch management: The process of assessing, testing, deploying, and verifying updates. Recovery point objective (RPO): The maximum acceptable amount of data loss expressed as time. Recovery time objective (RTO): The target time for restoring a service after disruption. Secure development lifecycle: A development process that integrates security throughout software creation and maintenance. Security baseline: An approved minimum secure configuration. Threat modelling: Structured analysis of assets, threats, trust boundaries, and mitigations. Vulnerability: A weakness that can be exploited to violate a security requirement. Zero trust: A security approach that avoids implicit trust and continuously verifies access. Review QuestionsShort Answer Questions- What is the purpose of operating-system hardening?
- Distinguish between an RPO and an RTO.
- Why should administrative accounts be individual rather than shared?
- State two common security risks affecting APIs.
- What does the cloud shared-responsibility model mean?
Long Answer Questions- Explain the stages of a mature patch and vulnerability-management process.
- Discuss how secure configuration, logging, and least privilege work together to protect an operating system.
- Explain why backups must be protected and restoration-tested, not merely created.
- Describe how threat modelling and secure coding contribute to application security.
- Compare the security responsibilities of customers using IaaS, PaaS, and SaaS.
Analytical / Application Questions- A company discovers an internet-facing server with an exploitable vulnerability and an isolated workstation with a more severe theoretical vulnerability. Which should be prioritised and why?
- Design a security improvement plan for an IoT deployment in which devices use default passwords, communicate on the same network as finance systems, and receive irregular updates.
- Analyse the retail-platform case and identify three governance failures in addition to the technical weaknesses. Recommend a control for each failure.
Multiple Choice Questions with AnswersQuestion 1Which control most directly reduces the permissions available to a compromised service account? A. Least privilege B. Data compression C. Load balancing D. Screen brightness control Correct Answer: A. Least privilege Question 2What does an RPO primarily describe? A. The maximum acceptable service restoration time B. The maximum acceptable amount of data loss measured in time C. The number of administrators allowed to use a system D. The time required to apply a software patch Correct Answer: B. The maximum acceptable amount of data loss measured in time Question 3Which practice best protects against unauthorised access to a cloud storage bucket? A. Making the bucket publicly readable B. Using least-privilege access policies and reviewing them C. Disabling all audit logs D. Using a longer storage-region name Correct Answer: B. Using least-privilege access policies and reviewing them Question 4Which statement correctly distinguishes authentication from authorisation? A. Authentication determines permissions; authorisation proves identity B. Authentication proves identity; authorisation determines permitted actions C. Both terms mean exactly the same thing D. Authorisation applies only to physical buildings Correct Answer: B. Authentication proves identity; authorisation determines permitted actions Question 5Which approach is safest for database queries that use user-supplied input? A. String concatenation without validation B. Parameterised queries with appropriate validation C. Displaying database errors to users D. Disabling database logging Correct Answer: B. Parameterised queries with appropriate validation Question 6Why should IoT devices be placed on segmented networks? A. To increase their screen resolution B. To limit the impact of compromise and restrict unnecessary communication C. To eliminate the need for updates D. To make default passwords acceptable Correct Answer: B. To limit the impact of compromise and restrict unnecessary communication Question 7In a typical IaaS arrangement, which task usually remains the customer’s responsibility? A. Operating the cloud provider’s physical data centre B. Maintaining the provider’s core hardware C. Securing the guest operating system and applications D. Repairing the provider’s cooling equipment Correct Answer: C. Securing the guest operating system and applications Question 8Which statement about backup is most accurate? A. A successful backup job guarantees successful recovery B. Backups should be protected and restoration should be tested C. Backups should always be publicly accessible D. Backups remove the need for incident response Correct Answer: B. Backups should be protected and restoration should be tested Question 9What is configuration drift? A. The planned encryption of a backup B. Unplanned divergence from an approved configuration C. The process of authenticating a user D. A method for compressing log files Correct Answer: B. Unplanned divergence from an approved configuration Question 10Which activity belongs most clearly in a secure development lifecycle? A. Threat modelling before or during system design B. Deleting all security requirements after deployment C. Sharing production credentials among developers D. Ignoring third-party dependencies Correct Answer: A. Threat modelling before or during system design
|