Tuesday, June 14, 2022

AWS Security options

Now a days cyber security is very important concern in the world. Daily basis everybody getting knowingly or unknowingly lot of cyber-attacks. Protecting data and environment is became lot of challenges. AWS is providing lot of services to protect our cloud environment from cyber-attack. AWS security is shared responsibilities between AWS and us. AWS reduces burden of protecting the infrastructure and services offered by them. Our responsibility is to use the proper tools and services to protect the services what we are using.

Following diagram represent the shared responsibility mode which is provided by AWS. For more details please refer here

 


Next challenge is to protect our application environment. To protect  our environment, it better to follow leading industrial standard cyber security framework. Cyber security framework will provide a set of guidelines, standard and best practice which we can implement.

In the cyber security industry, National Institute of Standards and Technology (NIST) is widely used and popular cyber security framework. NIST cyber framework is having set of guidelines to mitigating organization cyber-attack. The five core framework functions of NIST are listed below

In the context of NIST, AWS is providing various security services to adhere NIST framework. As AWS is having so many securities feature, we no need to use all. Based on the application need we need to use proper security service to protect our application.



Following table contain details of the security services provided by AWS. Following are currently available service based on their site, it may get outdated after sometime as AWS is keep adding more services for security click here to see exact details



As AWS is providing more security services to protect, we need to choose proper tools to protect our environment. Following diagram represent sample security design

 


IAM : This service provides access control to AWS services. Using role groups, Roles and Policies we can control access to one or group of people.

Cloud Trail:  This service records all AWS account activity. This service will be helpful to monitor and detect any unauthorized access

Cloud Watch: This service will be helpful to monitor application. This service we can configure to collect all the application service calls.  By default, it is integrated with 70+ AWS Services.

VPC: Virtual private cloud (VPC) enables us to create virtual network

Secret Manager: This service will provide a feature to store and retrieve application secrets like password. This service easily enables us to store database passwords, access key and other secrets and rotate

KMS : Key management service will help us to create and manage encryption key to encrypt data in rest. It is integrated with aws services to simply encrypt and decrypt data.

Certificate manager: This service will be helpful to quickly create a certificate, deploy it on AWS resources, such as Application Load Balancing, Amazon CloudFront distributions, and APIs on Amazon API Gateway. This also enable us to create private certificate for internal resources

Cognito : This service will be helpful to build authentication control in web and mobile very quickly. Cognito provides user pools and identity pools.    

Security hub : Security Hub collects security data from across AWS accounts, services, and supported third-party partner products and validated against industrial security standards like CIS, PCI DSS and AWS foundation security.

AWS Shield : This service will be helpful to protect for DDoS (Distributed Denial of Service) attack

AWS WAF: This service will protect web applications or APIs against common web exploits and bots that may affect availability and compromise security of application.

AWS Inspector: This service continuously scan EC2 instances and container images for software vulnerability.

AWS Macie: Macie automates the discovery of sensitive data, such as personally identifiable information (PII) and financial data, to provide you with a better understanding of the data that your organization stores in Amazon Simple Storage Service (Amazon S3)

On top of it we can use additional vendor services to further enhance security. AWS security competency partners are available here

Wednesday, June 8, 2022

Vulnerability Management

Software vulnerabilities are inevitable, we need to have a proper process to identity, evaluating, treating and reporting. In the software development phase Identifying vulnerability is crucial, on top of it identifying severity of vulnerability issue is very critical. As part of identifying activity, not all vulnerabilities will create huge problem, some of them will create huge problem. For example, if we do a code vulnerability scan it list lot of security issue, most of them will not create a problem. 

Vulnerability management encompasses of discovering, evaluating, prioritizing, remediating, and reporting of systems and software vulnerabilities. Our intentions should be remediated before attackers gets opportunity. vulnerability management is an important control for defending against various threats and minimizing.

Vulnerability management platform needs to identify common software security vulnerabilities of business and consumer threat. Few common vulnerabilities are

1.       OS command injection

2.       SQL injection

3.       Buffer overflow

4.       Missing data encryption

5.       Authentication and authorization

6.       Cross site script and

7.       URL re direction

Some of the reason for security vulnerabilities are as follows

1.       Unpatched system

2.       Security misconfiguration

3.       No proper security management solution in place

4.       Recent work from home challenges

Vulnerability Discovery

Finding real vulnerability in the system and software is a key phase in vulnerability management. There are lot of automated tools are available to scan application, network, and systems to identify weaknesses that could lead to vulnerable. Most of the vulnerability assessment tools can identify

  • Unwanted open ports
  • Software misconfiguration
  • Program error that can lead to vulnerable

Following few widely used discovery methods

·         Host-based vulnerability scanners – This method is used to identify server, desktop and network vulnerabilities.  These tools mostly identify ports, configuration, and patch issue.  For example, we can use tools Nmap, Aircrack to scan and identity issues

 ·         Static application security testing (SAST) – This method is used to secure software by reviewing its source code to identify sources of vulnerabilities. SAST focuses on the code content of the application, scanning the source code and its components to identify potential security vulnerabilities. For example SonarQube,Rips, etc tools are available to find code issues

 ·         Dynamic application security testing (DAST) is a program that communicates with a web application through the web front-end, to identify potential security vulnerabilities and architectural weaknesses in the application. For example we can use Netsparker, OWASP Zed Attack tools

 ·         Interactive application security testing (IAST) analyzes code for security vulnerabilities while an application is run by an automated test, human tester, or any activity that interacts with application functionality. It reports vulnerabilities in real-time. For example we can use Netsparker, OWASP Zed Attack tools

 ·         Penetration testing attempts to exploit any vulnerabilities in a system to find out whether unauthorized access or other malicious activity is possible, and identify which flaws pose an actual threat to the application

Vulnerability Priority

As I said earlier prioritizing and identifying is the main exercise of vulnerability management. Common Vulnerability Scoring System (CVSS), which is a free and open industry standard for assessing the severity of security vulnerabilities. CVSS Scoring system provides a numerical (0-10) representation of the severity of an information security vulnerability.

CVSS consists of three metric groups: Base, Temporal, and Environmental. The Base metrics produce a score ranging from 0 to 10, which can then be modified by scoring the Temporal and Environmental metrics. A CVSS score is also represented as a vector string, a compressed textual representation of the values used to derive the score. Two common uses of CVSS are calculating the severity of vulnerabilities discovered on one's systems and as a factor in prioritization of vulnerability remediation activities. The National Vulnerability Database (NVD) provides CVSS scores for almost all known vulnerabilities.

 

Vulnerability Mitigation

Once vulnerability is identified and prioritized, ideal next step is to remediated before it becomes serious security threat. Remediating a vulnerability means fixing or eliminating it and dealing with the root cause of the vulnerability

Remediation mostly required system patching, software update or library update which cannot be done immediately. Applying system patch sometimes will cause an issue, so need to check test properly before we apply to production environment. Even some of the remediation will take time to develop and fix.

As remediation will take time in most of the cases, organization needs to have proper mitigation plan/strategy. If anyone of the system got infected solution is identify infected file/software path them properly as it will take item.  First switch off that system and taking out that system from network is immediate mitigation steps to avoid large infection.

If application is using vulnerable library, then proper remediation is library update/need to identify alternative library and fix the issue. Immediate mitigation might be build monitor and alert system when that library is used. In that alert is there is any vulnerable call you take an immediate action.

Saturday, June 4, 2022

 

Enterprise Architecture framework will provide blueprint for an enterprise to use and create an architecture. It provides principles, practices, tools, and approaches that help enterprise to follow and improve their standard.

Enterprise architecture majorly contains four types



Business Architecture: This will take a lead role to defines the business strategy and governance to develop proper architecture to achieve organizational goal

Data Architecture:  This is core for organizational data strategy. It defines organization infrastructure like how data can be collected, transferred, and stored securely

Application Architecture:  This defines technology, pattern and systems can be used in applications and how each system can interact each other to achieve business goal. It will help us to created logical and physical architecture

Technology Architecture: This will be helpful for organization to define tools and technology which will be helpful to achieve business goals.

EA Frameworks

1. Zachman Framework

This is an enterprise ontology and is a fundamental structure for enterprise architecture which provides a formal and structured way of viewing and defining an enterprise.

This framework typically represented as a 6x6 matrix.

The rows of this framework on describing six perspectives interrogatives of What, how, where, who, when and why. The columns of the framework describes specific viewpoint of a group of stakeholders





More details https://www.zachman.com/

 

2.TOGAF (The Open Group Architectural Framework)

A generic framework for developing architecture to meet different business needs. This is Widley used framework. This framework can be applied large to small enterprise.

This standard enforce business goals as architecture drives and provide set of practices as follows

                ADM (Architecture Development Method)

                ADM Guidelines and Technique

                Architecture Content.

                Enterprise Continuum

                Capability Framework

More details https://pubs.opengroup.org/architecture/togaf9-doc/arch/

To Install phpMyAdmin in EC2 Instance

Following steps will help to install phpMyAdmin in EC2 Amazon linux2 instance. Following commands, should be run in the same order after SSH into EC2 instance

1. yum update -y

2. sudo amazon-linux-extras install -y php8.0

3. sudo yum install -y httpd

4. sudo systemctl start httpd

5. sudo systemctl enable httpd

6. sudo systemctl is-enabled httpd

7. sudo usermod -a -G apache ec2-user

8. sudo chown -R apache:apache /var/www

9. sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;

10. find /var/www -type f -exec sudo chmod 0664 {} \;

11. sudo yum install php-mbstring php-xml -y

12. sudo systemctl restart httpd

13. sudo systemctl restart php-fpm

14. cd /var/www/html

15. wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

15. mkdir MdaStageDbAdmin && tar -xvzf phpMyAdmin-latest-all-languages.tar.gz -C MdaStageDbAdmin --strip-components 1

17. mv config.sample.inc.php config.inc.php

18 blowfish_secret generate https://phpsolved.com/phpmyadmin-blowfish-secret-generator/

19. config file

20. $cfg['TempDir'] = '/tmp'; 

Thursday, June 2, 2022

Enterprise Architecture

 

What is enterprise architecture?

Enterprise architecture (EA) is a process that help organization to define the business processes and IT structure to meet their needs in current and future goals.

Who is enterprise?

Any organization that shares common set of goals that is government agencies, corporation and large organizations may comprise multiple enterprises.

What is the benefit of enterprise architecture?

·         EA helps organization set and achieve their goals in systematic way

·         Efficiently plan their business strategy and set the target more realistically

·         It will introduce consistence business process and information across business unit

·         It will introduce more efficient IT operation

Why enterprise architecture?

Enterprise architecture will bring all business unit together to operate with single business process with automated way. Identify technical and process gab between business units and implement to operate integrated way to achieve business goals. Enterprise architecture will identify and analyze current technology and utilize those technology to operate business more efficiently   

Is Any process/framework being available to follow?

Yes. There are lot of frameworks are available. Widely used few frameworks are

1.       TOGAF ( The open group architecture framework)

2.       Zachman Framework  

How will frameworks help for enterprise?

Framework will provide a starting point and provide a common terminology. Frameworks are captured and defined based on the real-world example, so it will give a lot of value add instead of inventing new.