Posts

Reset Jenkins Admin Password

Image
  Stop Jenkins: On Linux, use sudo service jenkins stop. On Windows, stop the Jenkins service from the Services window. Access the Jenkins Home Directory: By default, the home directory is located at /var/lib/jenkins/ on Linux and %JENKINS_HOME% on Windows. Remove the config.xml for Security: In the Jenkins home directory, locate the config.xml file. Open it in a text editor and search for the <useSecurity> tag. Change the value to false: xml Copy code <useSecurity>false</useSecurity> File will look like below- Save the file and exit. Start Jenkins: Start Jenkins again (sudo service jenkins start for Linux). Jenkins should now start without asking for a login, and you can create a new user or reset the credentials. Re-enable Security: Once you've logged in and set up new credentials, go back to the config.xml file. Set <useSecurity> back to true and restart Jenkins to enable security again.

AWS Security check list

  Creating a comprehensive security checklist for AWS involves considering various aspects of security, including identity and access management, data protection, network security, monitoring, and compliance. Here's a generalized checklist to help you ensure the security of your AWS environment: 1. Identity and Access Management (IAM):    - Use IAM to manage user access to AWS services and resources.    - Follow the principle of least privilege, granting only the permissions necessary for users' roles.    - Regularly review IAM policies and roles to remove unnecessary permissions.    - Enable multi-factor authentication (MFA) for privileged accounts.    - Rotate access keys and credentials regularly. 2. Data Protection:    - Encrypt data at rest using AWS Key Management Service (KMS) or other encryption mechanisms.    - Encrypt data in transit using SSL/TLS for communication between clients and AWS services.    - Implement access controls and encryption for sensitive data store

Security Terms: XDR vs MDR

XDR (Extended Detection and Response) and MDR (Managed Detection and Response) are terms used in the field of cybersecurity, specifically in the context of threat detection and response. Let's break down each term: 1. XDR (Extended Detection and Response):    Definition: XDR is a security solution that evolved from traditional Endpoint Detection and Response (EDR) systems. It expands the scope beyond endpoints to include various security telemetry sources such as network traffic, cloud services, and email.    - Key Features:       - Cross-Layered Detection: XDR integrates and correlates data from multiple security layers, providing a more comprehensive view of potential threats. This may include endpoints, networks, emails, and cloud services.       - Analytics and Automation: XDR leverages advanced analytics and automation to identify patterns and anomalies in the collected data. It often incorporates machine learning and artificial intelligence to enhance threat detection capabil

How to enable AWS EBS Volume snapshots encryption

Using the AWS console: Sign in to AWS console and navigate to https://console.aws.amazon.com/ec2/ From the left navigation choose snapshots option. Select the actionable snapshot, choose actions. Choose the Copy Snapshot option. Check the encryption option. Under the Master key choose the kms key (It is recommended to choose KMS CMK when EBS snapshot consist of highly sensitive data). Click on copy. Once the newly encrypted snapshot is ready old snapshot should be deleted. Using AWS CLI $> aws ec2 copy-snapshot --description [description-for-new-snapshot] --destination-region [region-name] --encrypted --kms-key-id [kms-key-id] ---source-region [region-name] --source-snapshot-id [actionable-snapshot-id] Command reference: https://docs.aws.amazon.com/cli/latest/reference/ec2/copy-snapshot.html $> aws ec2 delete-snapshot --snapshot-id [actionable-snapshot-id] --region [region-name] Command reference: https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-snapshot.html Note: App

How to prevent identity theft?

  Identity theft happens when anyone steals your personal information, like your name, Social Security number, or credit card info, and uses it for fraud or other criminal activities. Below are some tips to help prevent identity theft: ● Protect your personal information: Be cautious when giving out your personal information online and offline. Don't share your Social Security number, credit card number, or other sensitive information unless you trust the source and must provide it. ● Strong passwords: Strong and unique passwords for all your accounts are must. Also, avoid using the same password for multiple accounts. Use a password manager to store passwords securely. ● Monitor accounts: Frequently review your bank and credit card statements for unauthorized transactions, and check your credit report once a year for any suspicious activity. ● Phishing scams: Emails, texts, or phone calls asking for your personal information or credentials could be a scam. Avoid clicking on links

How to check SSL certificate expiration time through shell script

Image
  In this blog we will learn "How to check SSL certificate  number of days for expiration of our domain" I am going to show here in a Linux environment by using Shell script.  Create file by the name checkssl.sh - sudo nano checkssl.sh Code- Copy this code and save file. data=`echo | openssl s_client -servername $1 -connect $1:${2:-443} 2>/dev/null | openssl x509 -noout -enddate | sed -e 's#notAfter=##'` ssldate=`date -d "${data}" '+%s'` nowdate=`date '+%s'` diff="$((${ssldate}-${nowdate}))" echo $((${diff}/86400)) Output- You will get result as below

The key points of cost optimization and enhanced security for AWS and Azure infrastructure:

1. Cost Optimization: a. Resource Right-Sizing: Begin by analyzing the current resources in use on AWS and Azure. Identify any over-provisioned instances or underutilized resources. Utilize AWS and Azure tools like AWS Trusted Advisor, AWS Cost Explorer, and Azure Cost Management to gain insights into resource utilization and make informed decisions on right-sizing. b. Reserved Instances and Savings Plans: Investigate opportunities to leverage Reserved Instances (RIs) on AWS and Savings Plans on Azure. These commitment-based options can lead to substantial cost savings over pay-as-you-go pricing. c. Auto-Scaling: Implement auto-scaling for AWS and Azure resources to dynamically adjust resource capacity based on demand. This ensures that you are not over-provisioning resources during peak times and are not paying for idle capacity during low-demand periods. d. Storage Optimization: Evaluate your data storage practices, including the use of different storage classes, data archiving,