<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Orhan Kamo</title>
    <description>The latest articles on DEV Community by Orhan Kamo (@orhan_kamo_5bd96f9498a487).</description>
    <link>https://dev.to/orhan_kamo_5bd96f9498a487</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2238569%2F6e500529-c177-452d-81fc-47e96e77fa48.jpg</url>
      <title>DEV Community: Orhan Kamo</title>
      <link>https://dev.to/orhan_kamo_5bd96f9498a487</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/orhan_kamo_5bd96f9498a487"/>
    <language>en</language>
    <item>
      <title>What is VPC Flow Log ? How to Enable VPC Log</title>
      <dc:creator>Orhan Kamo</dc:creator>
      <pubDate>Mon, 04 Nov 2024 15:18:09 +0000</pubDate>
      <link>https://dev.to/orhan_kamo_5bd96f9498a487/what-is-vpc-flow-log-how-to-enable-vpc-log-4o18</link>
      <guid>https://dev.to/orhan_kamo_5bd96f9498a487/what-is-vpc-flow-log-how-to-enable-vpc-log-4o18</guid>
      <description>&lt;p&gt;With Amazon Virtual Private Cloud (Amazon VPC), you can launch AWS resources in a logically isolated virtual network that you've defined. This virtual network closely resembles a traditional network that you'd operate in your own data center, with the benefits of using the scalable infrastructure of AWS.&lt;/p&gt;

&lt;p&gt;Capture information about IP traffic going into your interfaces:&lt;br&gt;
• VPC Flow Logs&lt;br&gt;
• Subnet Flow Logs&lt;br&gt;
• Elastic Network Interface (ENI) Flow Logs&lt;br&gt;
• Helps to monitor &amp;amp; troubleshoot connectivity issues&lt;br&gt;
• Flow logs data can go to S3, CloudWatch Logs, and Kinesis Data Firehose&lt;br&gt;
• Captures network information from AWS managed interfaces too: ELB,&lt;br&gt;
RDS, ElastiCache, Redshift, WorkSpaces, NATGW, Transit Gateway…&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VPC Flow Logs –Traffic not captured
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;• Traffic to Amazon DNS server (custom DNS server traffic is logged)&lt;br&gt;
• Traffic for Amazon Windows license activation&lt;br&gt;
• Traffic to and from 169.254.169.254 for EC2 instance metadata&lt;br&gt;
• Traffic to and from 169.254.169.123 for Amazon Time Sync service&lt;br&gt;
• DHCP traffic&lt;br&gt;
• Mirrored traffic&lt;br&gt;
• Traffic to the VPC router reserved IP address (e.g., 10.0.0.1)&lt;br&gt;
• Traffic between VPC Endpoint ENI and Network Load Balancer ENI&lt;/p&gt;

&lt;p&gt;We can use query with Athena ( top 10 ip adress)&lt;/p&gt;

&lt;p&gt;We enable VPC Flow and we sent logs to S3 and CloudWatch&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrakj9f21d35x1hcsgrn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrakj9f21d35x1hcsgrn.PNG" alt="Image description" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We created VPC&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkgm4y4fqc8nqnow6na06.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkgm4y4fqc8nqnow6na06.PNG" alt="Image description" width="613" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;aggreation interval 10 minutes because 1 minute means to many logs and it can be expensive and if we want to sent logs to CloudWatch, we need IAM role&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa60u2knj4nsn8ff64mn8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa60u2knj4nsn8ff64mn8.PNG" alt="Image description" width="577" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right now we sent logs to S3.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsymhnmyvgbjbfraqrj48.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsymhnmyvgbjbfraqrj48.PNG" alt="Image description" width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxp0evmcycxkctm33brx4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxp0evmcycxkctm33brx4.PNG" alt="Image description" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>security</category>
      <category>awsvpc</category>
    </item>
    <item>
      <title>What is Aws Macie ? How to discover data with Macie ?</title>
      <dc:creator>Orhan Kamo</dc:creator>
      <pubDate>Wed, 23 Oct 2024 05:31:44 +0000</pubDate>
      <link>https://dev.to/orhan_kamo_5bd96f9498a487/what-is-aws-macie-how-to-discovery-data-with-macie--1km4</link>
      <guid>https://dev.to/orhan_kamo_5bd96f9498a487/what-is-aws-macie-how-to-discovery-data-with-macie--1km4</guid>
      <description>&lt;p&gt;The size and value of data is increasing day by day, and where the data is and who accesses it has become the most important job of data security. While we can make data discovery with data lost prevention (DLP) products, let's examine how we can do this in our aws s3 buckets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg17yd8s66mt3snqy3kqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg17yd8s66mt3snqy3kqk.png" alt="Image description" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon Macie discovers sensitive data using machine learning and pattern matching, provides visibility into data security risks, and enables automated protection against those risks. Macie work with EventBridge and Therefor you can take action ( for example using with Lambda, SNS ). &lt;/p&gt;

&lt;p&gt;What we can discovery ?&lt;br&gt;
PII &lt;br&gt;
Credirt Cart&lt;br&gt;
Aws Account &lt;br&gt;
Bank Account&lt;br&gt;
IBAN, Tax ID ...&lt;br&gt;
what you need ( with Regular Expression )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnvxsbbfg2gv2qi4dlfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnvxsbbfg2gv2qi4dlfh.png" alt="Image description" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scenario&lt;br&gt;
There is a bucket called "s3macie" and we will upload a text containing a Turkish Identity number here. Then we create a job by enabling Macie and wait for it to find it in the scan.&lt;br&gt;
We created a bucket named s3macie and enable Macie.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd1nh0d5go7w43p685a1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd1nh0d5go7w43p685a1.PNG" alt="Image description" width="800" height="309"&gt;&lt;/a&gt;&lt;br&gt;
Get started&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2btrg80299lhdfu7mmox.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2btrg80299lhdfu7mmox.PNG" alt="Image description" width="800" height="325"&gt;&lt;/a&gt;&lt;br&gt;
Enable Macie&lt;/p&gt;

&lt;p&gt;We create job ( Discover data )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flqn6j94tcxrqiqh90u5z.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flqn6j94tcxrqiqh90u5z.PNG" alt="Image description" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose S3 Buckets&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafnwfif6xdm9wv8vriem.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafnwfif6xdm9wv8vriem.PNG" alt="Image description" width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step: Refine the Scope ( Schedule job, include , exclude)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa8p9vfo7ehbb9mhx026k.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa8p9vfo7ehbb9mhx026k.PNG" alt="Image description" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step: Select Managed Data Identifiers ( select pattern or  list of custom regular expression part)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4z2hmkuybos6mc87vxz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4z2hmkuybos6mc87vxz.PNG" alt="Image description" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we want to discover Turkish Identity Number .That's why i go with "custom"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faoj8oxagrnasgx9rail7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faoj8oxagrnasgx9rail7.PNG" alt="Image description" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;List of custom pattern . We create new condition here&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl0b37gdtu638qgboc697.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl0b37gdtu638qgboc697.PNG" alt="Image description" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create new&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff03h4fsvforn47sse1up.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff03h4fsvforn47sse1up.PNG" alt="Image description" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I write regex and test Turkish Identity Number ( rigt side )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm40eg02wqa6zpu57xer5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm40eg02wqa6zpu57xer5.PNG" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back to "Select custom data identifiers"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5cygdc04t25xwb2clfm8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5cygdc04t25xwb2clfm8.PNG" alt="Image description" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step: Enter General Setting enter value and "Next"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk97rjqwalqh6anpsf7d7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk97rjqwalqh6anpsf7d7.PNG" alt="Image description" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;End we create the job&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbjps1ra1t7w69vup8r4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbjps1ra1t7w69vup8r4.PNG" alt="Image description" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We upload the file ( include test Turkish Identity Number&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwry1bsxkp38cp9alr6x.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwry1bsxkp38cp9alr6x.PNG" alt="Image description" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally We find critical data on S3 buckest with Macie&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4kvxuyppqkq1rwflbz4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4kvxuyppqkq1rwflbz4.PNG" alt="Image description" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>macie</category>
      <category>awssec</category>
      <category>security</category>
    </item>
    <item>
      <title>Aws GuardDuty and S3 Malware Protection with GuardDuty</title>
      <dc:creator>Orhan Kamo</dc:creator>
      <pubDate>Mon, 21 Oct 2024 10:13:10 +0000</pubDate>
      <link>https://dev.to/orhan_kamo_5bd96f9498a487/aws-guardduty-and-s3-malware-protection-with-guardduty-39on</link>
      <guid>https://dev.to/orhan_kamo_5bd96f9498a487/aws-guardduty-and-s3-malware-protection-with-guardduty-39on</guid>
      <description>&lt;p&gt;Guardduty is one of the must-have cybersecurity services among AWS services. Threat analysis, a suspicious login that did not exist before (for example, it can be a request from an unexpected country). It can perform discovery with threat intelligent to protect AWS accounts. It can analyze using mainly the following services and logs.&lt;br&gt;
· CloudTrail Events Logs: unusal API callls, unauthorized deployments&lt;/p&gt;

&lt;p&gt;· CloudTrail Managment Events: create VPC subnet, create trail&lt;/p&gt;

&lt;p&gt;· CloudTrail S3 Data Events: get object, list object, delete object&lt;/p&gt;

&lt;p&gt;· VPC Flow Logs: unusual internal traffic, unusual IP address&lt;/p&gt;

&lt;p&gt;· DNS Logs: compromised EC2 instances sending encoded data within DNS queries&lt;br&gt;
It also analyzes EKS Audit Logs, RDS and Aurora, EBS, Lambda, S3 Data Events.&lt;br&gt;
In addition to blocking GuardDuty CryptoCurrency attacks, you can take automatic actions with EventBridge. Let's examine a sample event formation with the diagram below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foymc0043m3h0spp8fr6h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foymc0043m3h0spp8fr6h.PNG" alt="Image description" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As can be seen above, we receive logs from the log sources on the left with GuardDuty and let's assume that a suspicious situation has occurred. GuardDuty sends this information with EventBridge and we can send a notification with SNS or take action automatically using Lambda.&lt;br&gt;
First I create an S3 bucket.&lt;br&gt;
Now let's do a scenario of using GuardDuty. In the scenario I will use an s3 bucket and try to load eicar here.&lt;/p&gt;

&lt;p&gt;I created S3 bucket ( name testgaurd) and go to the guardDuty.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpb5ekl6wi6ntgudkhoz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpb5ekl6wi6ntgudkhoz.PNG" alt="Image description" width="800" height="265"&gt;&lt;/a&gt;&lt;br&gt;
We do not need all-features. Click "GuardDuty Malware Protection for S3 only"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxisef1ui5gg5aigpp8x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxisef1ui5gg5aigpp8x.png" alt="Image description" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Browse S3 ad choose testguard bucket.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00lyazwjzuvqac3li793.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00lyazwjzuvqac3li793.png" alt="Image description" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is an important point here. We need to assign a role, otherwise we cannot access and enable GuardDuty S3 bucket because it is not authorised. For the permissions that should be here, we say View permission, copy the ones here and then add a role and policy on the IAM side with Create role and attached role on GuardDuty permission&lt;/p&gt;

&lt;p&gt;Finally wecan upload Eicar ( malware file). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4f8bivrpipzxfgjg3ec5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4f8bivrpipzxfgjg3ec5.png" alt="Image description" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And GuardDuty detect malware file&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbm05zje3ft124u3kwf0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbm05zje3ft124u3kwf0y.png" alt="Image description" width="800" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>guardduty</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
