root-access 1.3.38 → 1.3.40

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.
package/README.md CHANGED
@@ -17,20 +17,15 @@
17
17
 
18
18
  </div>
19
19
 
20
- ---
21
20
 
22
- ## 🎯 CTF Challenge
23
21
 
24
- **Category:** Reverse Engineering + CLI Exploitation
25
- **Difficulty:** ★★★★★★★★★★ (10/10)
26
- **Points:** 2000
27
22
 
28
23
  ---
29
24
 
30
25
  ## 📦 Installation
31
26
 
32
27
  ```bash
33
- npm install -g rootaccess
28
+ npm install -g root-access
34
29
  ```
35
30
 
36
31
  Or run directly:
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ function a0_0x46e0(){const _0x5884ff=['\x0a\x1b[32m[DEBUG]\x20Layer\x201\x20unlocked!\x1b[0m','\x1b[33m⚠\x1b[0m','Network','test','699690SujmFy','[INTERNAL]\x20Fragment\x206:\x20','157360LhpfxI','\x0a\x1b[36m[*]\x20Scan\x20complete.\x1b[0m','\x1b[32m[+]\x20Connection\x20established\x20to\x20classified\x20server!\x1b[0m','\x1b[32m✓\x1b[0m','from','toString','shadowgate','LAYER_ONE','argv','--server=','--final','\x1b[33m[*]\x20The\x20key\x20must\x20be\x20forged\x20from\x205\x20components.\x1b[0m','--ack=','\x1b[32m[!]\x20Hidden\x20data\x20found\x20in\x20registry!\x1b[0m','[FINAL]\x20Fragment\x2010:\x20','\x1b[32mACTIVE\x1b[0m','[*]\x20Next\x20window\x20in\x20~','internal','\x0a\x1b[36m[*]\x20Initiating\x20security\x20scan...\x1b[0m\x0a','find','\x1b[33m[*]\x20Deep\x20scan\x20enabled...\x1b[0m','[CLASSIFIED]\x20Fragment\x204:\x20','forEach','\x0a\x1b[31m[-]\x20Invalid\x20key.\x20Keep\x20forging...\x1b[0m','-s=','about','includes','../lib/keyforge.js','--chain=','\x0a\x1b[36m[UNLOCK]\x20File-based\x20authentication\x1b[0m','[ESTABLISHED]\x20Fragment\x209:\x20','\x1b[33m[*]\x20Advanced:\x20rootaccess\x20decrypt\x20--msg=<msg>\x20--chain=<frag1+frag2>\x1b[0m','SHADOW_','SHADOWGATE','\x1b[90m[*]\x20Chain\x20key\x20was:\x20','path','split','Registry','--msg=','shadow','startsWith','update','\x1b[32m[INTERNAL]\x20Access\x20granted\x20to\x20internal\x20API\x1b[0m','--syn','getFragment','[*]\x20Once\x20you\x20have\x20all\x209\x20fragments,\x20forge\x20the\x20key\x20and\x20assemble.\x0a','../lib/network.js','hex','showKeyBuilder','--ultra','\x20\x20Crypto\x20Module:\x20\x20\x20\x1b[32mONLINE\x1b[0m','\x0a\x1b[35m[FINAL]\x20The\x20last\x20fragment\x20requires\x20the\x20master\x20key.\x1b[0m','\x1b[31m[-]\x20Unlock\x20file\x20content\x20incorrect.\x1b[0m','\x1b[31m[-]\x20Invalid\x20master\x20key.\x1b[0m','checkIntegrity','\x1b[33m[*]\x20Decode\x20the\x20hex\x20and\x20use:\x20rootaccess\x20shadow\x20--token=<TOKEN>\x1b[0m','getMasterHint','\x1b[32m[+]\x20Shadow\x20window\x20is\x20ACTIVE\x1b[0m','\x1b[33m[*]\x20Content:\x20SHA256(CODENAME\x20+\x20\x22_UNLOCK_\x22\x20+\x20VERSION)[0:16]\x1b[0m','--hint=','[CHAIN]\x20Fragment\x205:\x20','slice','anomaly','ROOTACCESS_DEBUG','computeComponent','[UNLOCK]\x20Fragment\x208:\x20','1478922YKsTRC','assemble','\x1b[33m[*]\x20Hint:\x20Try\x20--chain\x20parameter\x20for\x20advanced\x20decryption.\x1b[0m','\x1b[33m[*]\x20Create\x20file:\x20','766588mEJzOy','\x20\x20Vault\x20Status:\x20\x20\x20\x20\x1b[33mLOCKED\x1b[0m','--token=','verifyKey','[MASTER]\x20','REVEAL_ALL','createHash','\x20\x20Shadow\x20Window:\x20\x20\x20','\x20=\x20','\x1b[33m\x20\x20\x20\x20rootaccess\x20handshake\x20--ack=<COMPUTED_ACK>\x20--ts=','sha256','-m=','--component=','\x0a\x1b[36mRootAccess\x20CLI\x1b[0m\x0aA\x20security\x20research\x20tool\x20for\x20penetration\x20testing.\x0a\x0aCreated\x20by:\x20Uttam\x20Mahata\x0aLicense:\x20MIT\x0aRepository:\x20https://github.com/Uttam-Mahata/rootaccess\x0a\x0a\x1b[33m\x22The\x20truth\x20is\x20hidden\x20in\x20plain\x20sight...\x22\x1b[0m\x0a\x0a\x1b[90m//\x20TODO:\x20Remove\x20debug\x20endpoints\x20before\x20production\x0a//\x20Endpoints:\x20/api/v1/internal/fragments\x0a//\x20Auth:\x20Bearer\x20SHADOWGATE_TOKEN_X7K9\x0a//\x20Shadow\x20hours:\x20minutes\x200-10\x20or\x2030-40\x20of\x20any\x20hour\x20(UTC)\x0a//\x20Unlock\x20file:\x20/tmp/.rootaccess_shadow\x1b[0m\x0a','\x0a\x1b[36m[*]\x20Connecting\x20to\x20server:\x20','1.3.37','name','getUTCMinutes','250471JjetdC','--solve=','\x1b[32m[+]\x20Shadow\x20access\x20granted!\x1b[0m','-c=','RootAccess\x20CLI\x20v','\x0a\x1b[36mUsage:\x1b[0m\x20rootaccess\x20<command>\x20[options]\x0a\x0a\x1b[36mCommands:\x1b[0m\x0a\x20\x20help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20version\x20\x20\x20\x20\x20\x20\x20Show\x20version\x20information\x0a\x20\x20status\x20\x20\x20\x20\x20\x20\x20\x20Check\x20system\x20status\x0a\x20\x20scan\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Scan\x20for\x20vulnerabilities\x0a\x20\x20connect\x20\x20\x20\x20\x20\x20\x20Connect\x20to\x20remote\x20server\x0a\x20\x20decrypt\x20\x20\x20\x20\x20\x20\x20Decrypt\x20a\x20message\x0a\x20\x20forge\x20\x20\x20\x20\x20\x20\x20\x20\x20Access\x20the\x20Key\x20Forge\x0a\x20\x20handshake\x20\x20\x20\x20\x20Network\x20handshake\x20protocol\x0a\x20\x20about\x20\x20\x20\x20\x20\x20\x20\x20\x20About\x20this\x20tool\x0a\x0a\x1b[36mExamples:\x1b[0m\x0a\x20\x20rootaccess\x20status\x0a\x20\x20rootaccess\x20scan\x20--deep\x0a\x20\x20rootaccess\x20connect\x20--server\x20alpha\x0a\x0a\x1b[33mHint:\x20Not\x20everything\x20is\x20what\x20it\x20seems...\x2010\x20layers\x20await.\x1b[0m\x0a','[SYN-ACK]\x20Server\x20responds\x20with\x20token:\x20','\x20(hex\x20encoded)\x0a','help','__internal__','932883GZuVcj','Memory','[*]\x20Initiate\x20handshake\x20with:\x20rootaccess\x20handshake\x20--syn','repeat','\x1b[33m[*]\x20CODENAME\x20and\x20VERSION\x20are\x20shown\x20in\x20the\x20banner.\x1b[0m','\x1b[31m[-]\x20Usage:\x20rootaccess\x20assemble\x20--key=<MASTER_KEY>\x1b[0m','\x20\x20|\x20\x20Codename:\x20','\x1b[33m[*]\x20Your\x20content:\x20','\x0a\x1b[35m[EASTER\x20EGG]\x20You\x20found\x20the\x20master\x20trigger!\x1b[0m','toUpperCase','_GATE','\x20\x20Core\x20Engine:\x20\x20\x20\x20\x20\x1b[32mONLINE\x1b[0m','[*]\x20Current\x20token:\x20','readFileSync','\x1b[33m[*]\x20ACK\x20=\x20SHA256(timestamp\x20+\x20CODENAME\x20+\x20\x22ACK\x22)[0:8].toUpperCase()\x1b[0m','unlock','\x20minutes','\x1b[33m[*]\x20Hint:\x20Some\x20keys\x20are\x20forged\x20from\x20previous\x20discoveries...\x1b[0m','\x1b[31m[-]\x20ACK\x20verification\x20failed.\x1b[0m','\x1b[31m[-]\x20Shadow\x20window\x20is\x20INACTIVE\x1b[0m','\x1b[32m[SYN]\x20Connection\x20initiated\x1b[0m','/tmp/.rootaccess_shadow','\x1b[31m[-]\x20Invalid\x20shadow\x20token.\x1b[0m','assembleFlag','--ts=','some','\x0a\x1b[32m[COMPONENT]\x1b[0m\x20','analyzeRegistry','existsSync','\x0a\x1b[32m[✓]\x20MASTER\x20KEY\x20ACCEPTED\x1b[0m\x0a','\x1b[31mINACTIVE\x1b[0m','[*]\x20Available:\x20version,\x20codename,\x20timestamp,\x20xorPair,\x20primes\x0a','--deep','digest','env','\x1b[90m[*]\x20Expected\x20content\x20was:\x20SHA256(CODENAME\x20+\x20\x22_UNLOCK_\x22\x20+\x20VERSION)[0:16]\x1b[0m','_UNLOCK_','\x1b[31m[-]\x20Shadow\x20window\x20is\x20not\x20active.\x20Wait\x20for\x20the\x20right\x20time.\x1b[0m','--verify=','\x1b[33m[*]\x20Hint:\x20SHA256(CODENAME\x20+\x20\x22_UNLOCK_\x22\x20+\x20VERSION)[0:16]\x1b[0m','log','[SYN-ACK]\x20Timestamp:\x20','\x0a\x1b[35m╔═══════════════════════════════════════════════════════════╗\x0a║\x20\x20██████╗\x20\x20██████╗\x20\x20██████╗\x20████████╗\x20█████╗\x20\x20██████╗██████╗\x20\x20║\x0a║\x20\x20██╔══██╗██╔═══██╗██╔═══██╗╚══██╔══╝██╔══██╗██╔════╝██╔════╝\x20║\x0a║\x20\x20██████╔╝██║\x20\x20\x20██║██║\x20\x20\x20██║\x20\x20\x20██║\x20\x20\x20███████║██║\x20\x20\x20\x20\x20██████╗\x20\x20║\x0a║\x20\x20██╔══██╗██║\x20\x20\x20██║██║\x20\x20\x20██║\x20\x20\x20██║\x20\x20\x20██╔══██║██║\x20\x20\x20\x20\x20╚════██╗\x20║\x0a║\x20\x20██║\x20\x20██║╚██████╔╝╚██████╔╝\x20\x20\x20██║\x20\x20\x20██║\x20\x20██║╚██████╗██████╔╝\x20║\x0a║\x20\x20╚═╝\x20\x20╚═╝\x20╚═════╝\x20\x20╚═════╝\x20\x20\x20\x20╚═╝\x20\x20\x20╚═╝\x20\x20╚═╝\x20╚═════╝╚═════╝\x20\x20║\x0a╠═══════════════════════════════════════════════════════════════╣\x0a║\x20\x20Version:\x20','762616DGUEOV','[*]\x20This\x20simulates\x20a\x20TCP\x203-way\x20handshake.','--key=','crypto','\x0a\x1b[36m[HANDSHAKE]\x20TCP-like\x20handshake\x20protocol\x1b[0m','\x1b[31m[-]\x20Error\x20reading\x20unlock\x20file.\x1b[0m','\x1b[0m','\x1b[31m[-]\x20Decryption\x20failed.\x20Invalid\x20key.\x1b[0m','\x1b[33m[*]\x20Shadow\x20hours:\x20minutes\x200-10\x20or\x2030-40\x20of\x20any\x20hour\x20(UTC)\x1b[0m','[*]\x20Test\x20mode:\x20Output\x20=\x20t3st_0utput','\x1b[32m[ACK]\x20Handshake\x20complete!\x1b[0m','clean','\x1b[33m[*]\x20Hint:\x20Chain\x20=\x20MD5(fragment1\x20+\x20fragment2)[0:8]\x1b[0m','\x0a\x1b[32m[✓]\x20KEY\x20VERIFIED!\x20Use\x20this\x20with:\x20rootaccess\x20assemble\x20--key=<YOUR_KEY>\x1b[0m\x0a','Build:\x20',']\x1b[0m\x20','36srPVll','\x0a\x1b[36m[*]\x20System\x20Status\x1b[0m','\x0a\x1b[31m[-]\x20Unknown\x20component:\x20','omega-7','Codename:\x20','[*]\x20Run\x20\x27rootaccess\x20help\x27\x20for\x20usage.','md5','5VhqMYY','now','floor','\x0a\x1b[32m[ADMIN]\x20Elevated\x20access\x20detected!\x1b[0m','\x1b[33m[*]\x20Use\x20\x22rootaccess\x20forge\x22\x20to\x20build\x20the\x20master\x20key.\x1b[0m'];a0_0x46e0=function(){return _0x5884ff;};return a0_0x46e0();}const a0_0x50ec6d=a0_0x49c0;(function(_0x2387a9,_0xe732a9){const _0x2e464b=a0_0x49c0,_0x100326=_0x2387a9();while(!![]){try{const _0x22b0b7=parseInt(_0x2e464b(0x131))/0x1+-parseInt(_0x2e464b(0x188))/0x2+-parseInt(_0x2e464b(0x186))/0x3+-parseInt(_0x2e464b(0x11f))/0x4*(-parseInt(_0x2e464b(0x17d))/0x5)+-parseInt(_0x2e464b(0x11b))/0x6+-parseInt(_0x2e464b(0x13b))/0x7+-parseInt(_0x2e464b(0x166))/0x8*(-parseInt(_0x2e464b(0x176))/0x9);if(_0x22b0b7===_0xe732a9)break;else _0x100326['push'](_0x100326['shift']());}catch(_0x56c19c){_0x100326['push'](_0x100326['shift']());}}}(a0_0x46e0,0x202b0));const crypto=require(a0_0x50ec6d(0x169)),fs=require('fs'),path=require(a0_0x50ec6d(0xfc)),{CoreSystem}=require('../lib/index.js'),{DataVault}=require('../lib/vault.js'),{CryptoEngine}=require('../lib/crypto.js'),{NetworkSim}=require(a0_0x50ec6d(0x107)),{KeyForge}=require(a0_0x50ec6d(0xf4)),VERSION=a0_0x50ec6d(0x12e),CODENAME=a0_0x50ec6d(0xfa);let handshakeState={'synSent':![],'synAckReceived':![],'token':null,'timestamp':null};const banner=a0_0x50ec6d(0x165)+VERSION+a0_0x50ec6d(0x141)+CODENAME+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20║\x0a╚═══════════════════════════════════════════════════════════════╝\x1b[0m\x0a',DEBUG_KEY=process[a0_0x50ec6d(0x15d)][a0_0x50ec6d(0x118)],ADMIN_MODE=process['env']['ROOTACCESS_ADMIN']===a0_0x50ec6d(0x18e);function getTimeWindowToken(){const _0xbfd5b1=a0_0x50ec6d,_0x157879=new Date(),_0x4c7797=_0x157879['getUTCMinutes'](),_0x492aa0=Math[_0xbfd5b1(0x17f)](_0x4c7797/0x5);return crypto[_0xbfd5b1(0x125)](_0xbfd5b1(0x17c))[_0xbfd5b1(0x102)](_0xbfd5b1(0xf9)+_0x492aa0+_0xbfd5b1(0x145))['digest'](_0xbfd5b1(0x108))[_0xbfd5b1(0x116)](0x0,0x6)[_0xbfd5b1(0x144)]();}function isInShadowWindow(){const _0x3c0c6b=a0_0x50ec6d,_0x1cc6c2=new Date()[_0x3c0c6b(0x130)]();return _0x1cc6c2>=0x0&&_0x1cc6c2<=0xa||_0x1cc6c2>=0x1e&&_0x1cc6c2<=0x28;}function generateSynAckToken(){const _0x28e286=a0_0x50ec6d,_0x1cdebf=Date[_0x28e286(0x17e)]()[_0x28e286(0x18d)](),_0x4759f9=crypto[_0x28e286(0x125)](_0x28e286(0x129))[_0x28e286(0x102)](_0x1cdebf+CODENAME)['digest']('hex')[_0x28e286(0x116)](0x0,0x8)[_0x28e286(0x144)]();return{'token':_0x4759f9,'timestamp':_0x1cdebf};}function verifyAck(_0x41e840,_0x2d3725){const _0x342bbc=a0_0x50ec6d,_0x43af76=crypto['createHash'](_0x342bbc(0x129))['update'](_0x2d3725+CODENAME+'ACK')[_0x342bbc(0x15c)](_0x342bbc(0x108))[_0x342bbc(0x116)](0x0,0x8)[_0x342bbc(0x144)]();return _0x41e840===_0x43af76;}const commands={'help':()=>{const _0x461ddc=a0_0x50ec6d;console['log'](_0x461ddc(0x136));},'version':()=>{const _0x32c663=a0_0x50ec6d;console['log'](_0x32c663(0x135)+VERSION),console[_0x32c663(0x163)](_0x32c663(0x17a)+CODENAME),console[_0x32c663(0x163)](_0x32c663(0x174)+Buffer['from']('4e4f5448494e475f48455245','hex')[_0x32c663(0x18d)]()),DEBUG_KEY===_0x32c663(0x18f)&&(console['log'](_0x32c663(0x182)),console[_0x32c663(0x163)]('[DEBUG]\x20Fragment\x201:\x20'+CryptoEngine['getFragment'](0x1)));},'status':()=>{const _0x47beea=a0_0x50ec6d,_0x296648=new CoreSystem();console[_0x47beea(0x163)](_0x47beea(0x177)),console['log']('─'['repeat'](0x28)),console[_0x47beea(0x163)](_0x47beea(0x146)),console[_0x47beea(0x163)](_0x47beea(0x10b)),console[_0x47beea(0x163)](_0x47beea(0x120)),console['log']('\x20\x20Network:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x1b[31mRESTRICTED\x1b[0m'),console[_0x47beea(0x163)](_0x47beea(0x126)+(isInShadowWindow()?_0x47beea(0xe8):_0x47beea(0x159))),console[_0x47beea(0x163)]('─'[_0x47beea(0x13e)](0x28)),ADMIN_MODE&&(console['log'](_0x47beea(0x180)),console['log']('[ADMIN]\x20Fragment\x202:\x20'+CryptoEngine[_0x47beea(0x105)](0x2))),_0x296648[_0x47beea(0x10f)]();},'scan':_0x3ce36c=>{const _0xb5305b=a0_0x50ec6d;console[_0xb5305b(0x163)](_0xb5305b(0xeb));const _0x59a468=[{'name':_0xb5305b(0x13c),'status':_0xb5305b(0x171)},{'name':_0xb5305b(0x184),'status':_0xb5305b(0x171)},{'name':'Filesystem','status':_0xb5305b(0x171)},{'name':_0xb5305b(0xfe),'status':_0xb5305b(0x117)}];_0x59a468[_0xb5305b(0xef)]((_0x2a533d,_0x429df1)=>{setTimeout(()=>{const _0x533fd7=a0_0x49c0,_0x5a0038=_0x2a533d['status']===_0x533fd7(0x171)?_0x533fd7(0x18b):_0x533fd7(0x183);console[_0x533fd7(0x163)]('\x20\x20'+_0x5a0038+'\x20'+_0x2a533d[_0x533fd7(0x12f)]+':\x20'+_0x2a533d['status']);},_0x429df1*0x1f4);}),setTimeout(()=>{const _0x20b5f4=_0xb5305b;console['log'](_0x20b5f4(0x189));if(_0x3ce36c[_0x20b5f4(0xf3)](_0x20b5f4(0x15b))||_0x3ce36c[_0x20b5f4(0xf3)]('-d')){console[_0x20b5f4(0x163)](_0x20b5f4(0xed));const _0x49433b=new DataVault(),_0x3b7412=_0x49433b[_0x20b5f4(0x156)]();_0x3b7412&&(console[_0x20b5f4(0x163)](_0x20b5f4(0x195)),console['log']('[DATA]\x20'+_0x3b7412));}_0x3ce36c[_0x20b5f4(0xf3)](_0x20b5f4(0x10a))&&console[_0x20b5f4(0x163)]('\x0a\x1b[35m[ULTRA]\x20Fragment\x203:\x20'+CryptoEngine[_0x20b5f4(0x105)](0x3)+_0x20b5f4(0x16c));},0x9c4);},'connect':_0x43addf=>{const _0x2e0727=a0_0x50ec6d,_0x4c939e=new NetworkSim(),_0xdac9c7=_0x43addf[_0x2e0727(0xec)](_0x1186f7=>_0x1186f7[_0x2e0727(0x101)](_0x2e0727(0x191))||_0x1186f7[_0x2e0727(0x101)](_0x2e0727(0xf1))),_0x4a61bc=_0xdac9c7?_0xdac9c7[_0x2e0727(0xfd)]('=')[0x1]:'default';console['log'](_0x2e0727(0x12d)+_0x4a61bc+'\x1b[0m');if(_0x4a61bc===_0x2e0727(0x179)||_0x4a61bc==='OMEGA-7')console['log'](_0x2e0727(0x18a)),console[_0x2e0727(0x163)](_0x2e0727(0xee)+CryptoEngine['getFragment'](0x4));else _0x4a61bc==='alpha'?console[_0x2e0727(0x163)]('\x1b[33m[!]\x20Alpha\x20server\x20deprecated.\x20Try\x20omega-7?\x1b[0m'):console[_0x2e0727(0x163)]('\x1b[31m[-]\x20Connection\x20refused.\x20Server\x20not\x20found.\x1b[0m');},'decrypt':_0x31be18=>{const _0x2ad782=a0_0x50ec6d,_0x37ad03=_0x31be18[_0x2ad782(0xec)](_0x2df4ef=>_0x2df4ef['startsWith'](_0x2ad782(0xff))||_0x2df4ef[_0x2ad782(0x101)](_0x2ad782(0x12a))),_0x15f285=_0x31be18[_0x2ad782(0xec)](_0x5b03a2=>_0x5b03a2[_0x2ad782(0x101)](_0x2ad782(0xf5)));if(!_0x37ad03){console[_0x2ad782(0x163)]('\x1b[31m[-]\x20Usage:\x20rootaccess\x20decrypt\x20--msg=<encrypted>\x1b[0m'),console['log'](_0x2ad782(0x14c)),console[_0x2ad782(0x163)](_0x2ad782(0xf8));return;}const _0x2f7fdc=_0x37ad03[_0x2ad782(0xfd)]('=')[0x1];if(_0x15f285){const _0x10ae66=_0x15f285[_0x2ad782(0xfd)]('=')[0x1],_0x55a012=CryptoEngine[_0x2ad782(0x105)](0x1),_0x388bd2=CryptoEngine[_0x2ad782(0x105)](0x2),_0x436001=crypto[_0x2ad782(0x125)](_0x2ad782(0x17c))[_0x2ad782(0x102)](_0x55a012+_0x388bd2)[_0x2ad782(0x15c)]('hex')['slice'](0x0,0x8);_0x10ae66===_0x436001&&_0x2f7fdc==='UNLOCK_CHAIN'?(console['log']('\x1b[32m[+]\x20Chain\x20decryption\x20successful!\x1b[0m'),console[_0x2ad782(0x163)](_0x2ad782(0x115)+CryptoEngine[_0x2ad782(0x105)](0x5)),console[_0x2ad782(0x163)](_0x2ad782(0xfb)+_0x436001+'\x1b[0m')):(console[_0x2ad782(0x163)]('\x1b[31m[-]\x20Chain\x20verification\x20failed.\x1b[0m'),console[_0x2ad782(0x163)](_0x2ad782(0x172)));}else _0x2f7fdc===_0x2ad782(0x185)?console['log'](_0x2ad782(0x16f)):(console[_0x2ad782(0x163)](_0x2ad782(0x16d)),console[_0x2ad782(0x163)](_0x2ad782(0x11d)));},'about':()=>{const _0x3faea9=a0_0x50ec6d;console[_0x3faea9(0x163)](_0x3faea9(0x12c));},'__internal__':_0x3fe675=>{const _0x31e8f8=a0_0x50ec6d;console[_0x31e8f8(0x163)](_0x31e8f8(0x103)),console['log'](_0x31e8f8(0x187)+CryptoEngine[_0x31e8f8(0x105)](0x6));},'shadow':_0x22965d=>{const _0x799393=a0_0x50ec6d,_0x41bf8e=_0x22965d[_0x799393(0xec)](_0x3ceffc=>_0x3ceffc[_0x799393(0x101)](_0x799393(0x121)));if(!_0x41bf8e){console[_0x799393(0x163)]('\x0a\x1b[36m[SHADOW]\x20Time-based\x20access\x20control\x1b[0m'),console[_0x799393(0x163)]('─'[_0x799393(0x13e)](0x28));if(isInShadowWindow()){const _0x482c11=getTimeWindowToken();console[_0x799393(0x163)](_0x799393(0x112)),console[_0x799393(0x163)](_0x799393(0x147)+Buffer[_0x799393(0x18c)](_0x482c11)[_0x799393(0x18d)]('hex')),console[_0x799393(0x163)](_0x799393(0x110));}else{const _0x4c2eec=new Date(),_0x33b4fe=_0x4c2eec[_0x799393(0x130)]();let _0x5c8746;if(_0x33b4fe<0x1e)_0x5c8746=0x1e-_0x33b4fe;else _0x33b4fe>0x28?_0x5c8746=0x3c-_0x33b4fe:_0x5c8746=0x0;console[_0x799393(0x163)](_0x799393(0x14e)),console[_0x799393(0x163)](_0x799393(0xe9)+_0x5c8746+_0x799393(0x14b)),console[_0x799393(0x163)](_0x799393(0x16e));}return;}const _0xe1e714=_0x41bf8e['split']('=')[0x1],_0x30127c=getTimeWindowToken();if(_0xe1e714===_0x30127c&&isInShadowWindow())console[_0x799393(0x163)](_0x799393(0x133)),console[_0x799393(0x163)]('[SHADOW]\x20Fragment\x207:\x20'+CryptoEngine[_0x799393(0x105)](0x7));else!isInShadowWindow()?console['log'](_0x799393(0x160)):console['log'](_0x799393(0x151));},'unlock':_0x28e68e=>{const _0x354c70=a0_0x50ec6d,_0x147324=_0x354c70(0x150),_0x235c00=crypto[_0x354c70(0x125)]('sha256')[_0x354c70(0x102)](CODENAME+_0x354c70(0x15f)+VERSION)[_0x354c70(0x15c)]('hex')[_0x354c70(0x116)](0x0,0x10);console[_0x354c70(0x163)](_0x354c70(0xf6)),console[_0x354c70(0x163)]('─'[_0x354c70(0x13e)](0x28));if(fs[_0x354c70(0x157)](_0x147324))try{const _0x33eb9c=fs[_0x354c70(0x148)](_0x147324,'utf8')['trim']();_0x33eb9c===_0x235c00?(console[_0x354c70(0x163)]('\x1b[32m[+]\x20Unlock\x20file\x20verified!\x1b[0m'),console[_0x354c70(0x163)](_0x354c70(0x11a)+CryptoEngine[_0x354c70(0x105)](0x8)),console[_0x354c70(0x163)](_0x354c70(0x15e))):(console[_0x354c70(0x163)](_0x354c70(0x10d)),console[_0x354c70(0x163)](_0x354c70(0x162)),console['log'](_0x354c70(0x142)+_0x33eb9c+'\x1b[0m'));}catch(_0x1c753a){console[_0x354c70(0x163)](_0x354c70(0x16b));}else console['log']('\x1b[31m[-]\x20Unlock\x20file\x20not\x20found.\x1b[0m'),console[_0x354c70(0x163)](_0x354c70(0x11e)+_0x147324+_0x354c70(0x16c)),console[_0x354c70(0x163)](_0x354c70(0x113)),console[_0x354c70(0x163)](_0x354c70(0x13f));},'handshake':_0x288a60=>{const _0x2b81f7=a0_0x50ec6d,_0x158e6f=_0x288a60[_0x2b81f7(0xf3)](_0x2b81f7(0x104)),_0x292a79=_0x288a60[_0x2b81f7(0xec)](_0x48ffa4=>_0x48ffa4[_0x2b81f7(0x101)](_0x2b81f7(0x194))),_0x2835a3=_0x288a60[_0x2b81f7(0xec)](_0x34fbd2=>_0x34fbd2['startsWith'](_0x2b81f7(0x153)));console[_0x2b81f7(0x163)](_0x2b81f7(0x16a)),console[_0x2b81f7(0x163)]('─'[_0x2b81f7(0x13e)](0x28));if(_0x158e6f){const {token:_0x1cf5ed,timestamp:_0x54693b}=generateSynAckToken();console[_0x2b81f7(0x163)](_0x2b81f7(0x14f)),console[_0x2b81f7(0x163)](_0x2b81f7(0x137)+_0x1cf5ed),console['log'](_0x2b81f7(0x164)+_0x54693b),console['log']('\x1b[33m[*]\x20Complete\x20handshake\x20with:\x1b[0m'),console[_0x2b81f7(0x163)](_0x2b81f7(0x128)+_0x54693b+'\x1b[0m'),console[_0x2b81f7(0x163)]('\x1b[33m[*]\x20ACK\x20=\x20SHA256(timestamp\x20+\x20CODENAME\x20+\x20\x22ACK\x22)[0:8].toUpperCase()\x1b[0m');}else{if(_0x292a79&&_0x2835a3){const _0x3bb50a=_0x292a79['split']('=')[0x1],_0x838777=_0x2835a3[_0x2b81f7(0xfd)]('=')[0x1];verifyAck(_0x3bb50a,_0x838777)?(console['log'](_0x2b81f7(0x170)),console[_0x2b81f7(0x163)](_0x2b81f7(0xf7)+CryptoEngine['getFragment'](0x9))):(console[_0x2b81f7(0x163)](_0x2b81f7(0x14d)),console['log'](_0x2b81f7(0x149)));}else console['log'](_0x2b81f7(0x13d)),console[_0x2b81f7(0x163)](_0x2b81f7(0x167));}},'forge':_0x1ebf01=>{const _0x130d1b=a0_0x50ec6d,_0x29d9ec=_0x1ebf01[_0x130d1b(0xec)](_0x173bd7=>_0x173bd7[_0x130d1b(0x101)](_0x130d1b(0x114))),_0xb4e170=_0x1ebf01['find'](_0x3f6129=>_0x3f6129[_0x130d1b(0x101)](_0x130d1b(0x12b))||_0x3f6129['startsWith'](_0x130d1b(0x134))),_0x38ece3=_0x1ebf01[_0x130d1b(0xec)](_0x6383c=>_0x6383c['startsWith'](_0x130d1b(0x132))),_0x3158fd=_0x1ebf01[_0x130d1b(0xec)](_0x43cd87=>_0x43cd87[_0x130d1b(0x101)](_0x130d1b(0x161))),_0x260052=_0x1ebf01[_0x130d1b(0xf3)](_0x130d1b(0x192));if(_0x29d9ec){const _0x293716=_0x29d9ec['split']('=')[0x1];console[_0x130d1b(0x163)]('\x0a\x1b[33m[HINT\x20'+_0x293716+_0x130d1b(0x175)+KeyForge['getHint'](_0x293716)+'\x0a');}else{if(_0xb4e170){const _0x5b2ce9=_0xb4e170['split']('=')[0x1],_0x108e40=KeyForge[_0x130d1b(0x119)](_0x5b2ce9);if(_0x108e40){const _0x3b3823=Buffer['from'](_0x108e40)[_0x130d1b(0x18d)]('hex');console[_0x130d1b(0x163)](_0x130d1b(0x155)+_0x5b2ce9+_0x130d1b(0x127)+_0x3b3823+_0x130d1b(0x138));}else console['log'](_0x130d1b(0x178)+_0x5b2ce9+_0x130d1b(0x16c)),console[_0x130d1b(0x163)](_0x130d1b(0x15a));}else{if(_0x3158fd){const _0x42cae6=_0x3158fd[_0x130d1b(0xfd)]('=')[0x1];KeyForge['verifyKey'](_0x42cae6)?console[_0x130d1b(0x163)](_0x130d1b(0x173)):(console[_0x130d1b(0x163)](_0x130d1b(0xf0)),console[_0x130d1b(0x163)]('\x1b[33m[*]\x20Use\x20--hint=6\x20for\x20the\x20pattern.\x1b[0m\x0a'));}else _0x260052?(console[_0x130d1b(0x163)](_0x130d1b(0x10c)),console['log'](_0x130d1b(0x106))):KeyForge[_0x130d1b(0x109)]();}}},'assemble':_0x453fa2=>{const _0xb6894e=a0_0x50ec6d,_0x2877ce=_0x453fa2[_0xb6894e(0xec)](_0x4ffa72=>_0x4ffa72[_0xb6894e(0x101)](_0xb6894e(0x168))),_0x19eff2=_0x2877ce?_0x2877ce[_0xb6894e(0xfd)]('=')[0x1]:null;if(!_0x19eff2){console[_0xb6894e(0x163)](_0xb6894e(0x140)),console['log'](_0xb6894e(0x181));return;}if(KeyForge[_0xb6894e(0x122)](_0x19eff2)){console['log'](_0xb6894e(0x158)),console[_0xb6894e(0x163)](_0xb6894e(0xe7)+CryptoEngine[_0xb6894e(0x105)](0xa)),console[_0xb6894e(0x163)]('');const _0x395178=new DataVault();_0x395178[_0xb6894e(0x152)]();}else console[_0xb6894e(0x163)](_0xb6894e(0x10e)),console[_0xb6894e(0x163)](_0xb6894e(0x193)),console[_0xb6894e(0x163)]('\x1b[33m[*]\x20Try:\x20rootaccess\x20forge\x20--hint=1\x1b[0m');}};function main(){const _0x597e08=a0_0x50ec6d,_0x32971f=process[_0x597e08(0x190)]['slice'](0x2),_0x22cfbf=_0x32971f[0x0]||_0x597e08(0x139),_0x4230b1=_0x32971f[_0x597e08(0x116)](0x1);(['help','status',_0x597e08(0xf2)][_0x597e08(0xf3)](_0x22cfbf)||!_0x22cfbf)&&console[_0x597e08(0x163)](banner);_0x32971f[_0x597e08(0x154)](_0x4b5c49=>_0x4b5c49[_0x597e08(0xf3)](_0x597e08(0x124)))&&(console[_0x597e08(0x163)](_0x597e08(0x143)),console[_0x597e08(0x163)](_0x597e08(0x123)+CryptoEngine[_0x597e08(0x111)]()));if(commands[_0x22cfbf])commands[_0x22cfbf](_0x4230b1);else{if(_0x22cfbf===_0x597e08(0x13a)||_0x22cfbf===_0x597e08(0xea))commands[_0x597e08(0x13a)](_0x4230b1);else{if(_0x22cfbf===_0x597e08(0x100))commands[_0x597e08(0x100)](_0x4230b1);else{if(_0x22cfbf===_0x597e08(0x14a))commands[_0x597e08(0x14a)](_0x4230b1);else _0x22cfbf==='assemble'?commands[_0x597e08(0x11c)](_0x4230b1):(console[_0x597e08(0x163)]('\x1b[31m[-]\x20Unknown\x20command:\x20'+_0x22cfbf+_0x597e08(0x16c)),console[_0x597e08(0x163)](_0x597e08(0x17b)));}}}}function a0_0x49c0(_0x21a247,_0x1fc411){_0x21a247=_0x21a247-0xe7;const _0x46e095=a0_0x46e0();let _0x49c02f=_0x46e095[_0x21a247];return _0x49c02f;}main();
@@ -0,0 +1 @@
1
+ const a0_0x516c77=a0_0x16c1;(function(_0x4e69da,_0x66bf40){const _0x83518d=a0_0x16c1,_0x39e979=_0x4e69da();while(!![]){try{const _0x1fa101=parseInt(_0x83518d(0x97))/0x1*(parseInt(_0x83518d(0xaa))/0x2)+parseInt(_0x83518d(0xb1))/0x3+parseInt(_0x83518d(0xa0))/0x4*(parseInt(_0x83518d(0xad))/0x5)+-parseInt(_0x83518d(0x9a))/0x6*(parseInt(_0x83518d(0x99))/0x7)+parseInt(_0x83518d(0x98))/0x8+parseInt(_0x83518d(0xa3))/0x9+parseInt(_0x83518d(0xab))/0xa*(-parseInt(_0x83518d(0x89))/0xb);if(_0x1fa101===_0x66bf40)break;else _0x39e979['push'](_0x39e979['shift']());}catch(_0x327112){_0x39e979['push'](_0x39e979['shift']());}}}(a0_0x1e35,0x21091));const crypto=require(a0_0x516c77(0x94)),XOR_KEY=a0_0x516c77(0xaf);function xorWithKey(_0x17789c,_0x2383a7){const _0x2b4040=a0_0x516c77;let _0x23793a='';for(let _0x65bd68=0x0;_0x65bd68<_0x17789c['length'];_0x65bd68++){_0x23793a+=String[_0x2b4040(0x8c)](_0x17789c[_0x2b4040(0xa4)](_0x65bd68)^_0x2383a7['charCodeAt'](_0x65bd68%_0x2383a7[_0x2b4040(0x9e)]));}return _0x23793a;}function encodeFragment(_0x16beb8){const _0x434459=a0_0x516c77,_0x166148=xorWithKey(_0x16beb8,XOR_KEY);return Buffer[_0x434459(0x96)](_0x166148,_0x434459(0x8d))[_0x434459(0xa1)](_0x434459(0x8f));}const PLAIN_FRAGMENTS={0x1:a0_0x516c77(0x9d),0x2:'d3_Cl1_',0x3:a0_0x516c77(0xa2),0x4:'_3ng1n3',0x5:a0_0x516c77(0x95),0x6:a0_0x516c77(0x9f),0x7:'_0f_',0x8:a0_0x516c77(0x83),0x9:a0_0x516c77(0x9b),0xa:'}'},ENCODED_FRAGMENTS={};for(let i=0x1;i<=0xa;i++){ENCODED_FRAGMENTS[i]=encodeFragment(PLAIN_FRAGMENTS[i]);}function xorDecode(_0x186f0f,_0x5450b9){const _0x177808=a0_0x516c77,_0x399502=Buffer[_0x177808(0x96)](_0x186f0f,_0x177808(0x8f))[_0x177808(0xa1)](_0x177808(0x8d));let _0x9b728e='';for(let _0x325431=0x0;_0x325431<_0x399502[_0x177808(0x9e)];_0x325431++){_0x9b728e+=String['fromCharCode'](_0x399502[_0x177808(0xa4)](_0x325431)^_0x5450b9[_0x177808(0xa4)](_0x325431%_0x5450b9[_0x177808(0x9e)]));}return _0x9b728e;}function a0_0x16c1(_0x49cb79,_0x1d08db){_0x49cb79=_0x49cb79-0x83;const _0x1e356c=a0_0x1e35();let _0x16c1b4=_0x1e356c[_0x49cb79];return _0x16c1b4;}function generateChainKey(_0x4fb901,_0x11be1c){const _0x197eda=a0_0x516c77;return crypto[_0x197eda(0xa6)](_0x197eda(0x8e))[_0x197eda(0xb0)](_0x4fb901+_0x11be1c)[_0x197eda(0x91)](_0x197eda(0xa9))[_0x197eda(0x8a)](0x0,0x8);}function generateHandshakeToken(_0x12e5dc){const _0x39a685=a0_0x516c77,_0x15d1f2=crypto[_0x39a685(0xa6)](_0x39a685(0xae))['update'](_0x12e5dc+'SHADOWGATE')[_0x39a685(0x91)](_0x39a685(0xa9));return _0x15d1f2[_0x39a685(0x8a)](0x0,0x8)[_0x39a685(0xa8)]();}class CryptoEngine{constructor(){const _0x3559f8=a0_0x516c77;this[_0x3559f8(0x90)]=_0x3559f8(0x88);}static[a0_0x516c77(0x84)](_0x493911){if(_0x493911<0x1||_0x493911>0xa)return'[INVALID\x20FRAGMENT]';return xorDecode(ENCODED_FRAGMENTS[_0x493911],XOR_KEY);}static[a0_0x516c77(0x9c)](){return 0xa;}static[a0_0x516c77(0x92)](_0x39a525,_0x757f80){return generateChainKey(_0x39a525,_0x757f80);}static['generateHandshakeToken'](_0x374feb){return generateHandshakeToken(_0x374feb);}static[a0_0x516c77(0xa7)](){const _0x41b90d=a0_0x516c77;return _0x41b90d(0x8b);}['encrypt'](_0x2186a6){const _0x462223=a0_0x516c77;return Buffer['from'](_0x2186a6)[_0x462223(0xa1)](_0x462223(0x8f));}[a0_0x516c77(0x93)](_0x42ecb5){const _0x2d3ef5=a0_0x516c77;try{return Buffer[_0x2d3ef5(0x96)](_0x42ecb5,_0x2d3ef5(0x8f))['toString']();}catch{return null;}}static[a0_0x516c77(0xa5)](){const _0x47790a=a0_0x516c77,_0x1c2aaf=[];for(let _0x3fee16=0x1;_0x3fee16<=0xa;_0x3fee16++){_0x1c2aaf[_0x47790a(0xac)](xorDecode(ENCODED_FRAGMENTS[_0x3fee16],XOR_KEY));}return _0x1c2aaf[_0x47790a(0x86)]('');}}function a0_0x1e35(){const _0x4e63ea=['crypto','3r1ng_','from','15CsCCNK','1706152zJLWdV','28KHVpku','83412ugBvzj','0ws','getTotalFragments','root{N0','length','M4st3r','16372mIkltc','toString','R3v3rs3','1338876IGKxSz','charCodeAt','__getFullFlag__','createHash','getMasterHint','toUpperCase','hex','24394uOEZjN','4320100vtuHdG','push','10jETfRX','sha256','SHADOWGATE','update','209271CTyCMm','Sh4d','getFragment','Some\x20keys\x20are\x20forged\x20from\x20previous\x20discoveries...','join','exports','xor-shadow','11LIQRAk','slice','Fragments:\x201-10\x20|\x20Assemble\x20with:\x20rootaccess\x20assemble\x20--key=MASTER_KEY','fromCharCode','binary','md5','base64','algorithm','digest','generateChainKey','decrypt'];a0_0x1e35=function(){return _0x4e63ea;};return a0_0x1e35();}const _internal={'key':XOR_KEY,'hint':'XOR\x20with\x20SHADOWGATE\x20to\x20decode\x20fragments','chainHint':a0_0x516c77(0x85)};module[a0_0x516c77(0x87)]={'CryptoEngine':CryptoEngine,'_internal':_internal};
@@ -0,0 +1 @@
1
+ const a1_0x107342=a1_0x52d0;(function(_0xe3ef3d,_0x1b9108){const _0x73551a=a1_0x52d0,_0x29ded8=_0xe3ef3d();while(!![]){try{const _0x280042=-parseInt(_0x73551a(0x14b))/0x1*(-parseInt(_0x73551a(0x138))/0x2)+parseInt(_0x73551a(0x144))/0x3*(parseInt(_0x73551a(0x14a))/0x4)+-parseInt(_0x73551a(0x136))/0x5*(-parseInt(_0x73551a(0x133))/0x6)+-parseInt(_0x73551a(0x142))/0x7*(parseInt(_0x73551a(0x14c))/0x8)+parseInt(_0x73551a(0x13f))/0x9+parseInt(_0x73551a(0x143))/0xa+-parseInt(_0x73551a(0x14e))/0xb;if(_0x280042===_0x1b9108)break;else _0x29ded8['push'](_0x29ded8['shift']());}catch(_0x289c36){_0x29ded8['push'](_0x29ded8['shift']());}}}(a1_0xece9,0x778aa));const fs=require('fs'),path=require(a1_0x107342(0x154)),_0x4f3a=[0x72,0x6f,0x6f,0x74,0x7b],_0xdecoy=a1_0x107342(0x149);class CoreSystem{constructor(){const _0x7be07c=a1_0x107342;this[_0x7be07c(0x13b)]=!![],this[_0x7be07c(0x145)]=['crypto','vault',_0x7be07c(0x13c)],this[_0x7be07c(0x141)]=this[_0x7be07c(0x135)]();}['_initSecret'](){const _0x1fa2cb=['S','h','4','d','0','w'];return _0x1fa2cb['join']('');}[a1_0x107342(0x151)](){const _0x379b2e=a1_0x107342,_0x34260f={'core':!![],'memory':!![],'_hint':'Environment\x20variables\x20hold\x20secrets...'};return process[_0x379b2e(0x152)][_0x379b2e(0x134)]==='shadowgate_debug'&&(console[_0x379b2e(0x137)](_0x379b2e(0x13d)),console['log'](_0x379b2e(0x148))),_0x34260f[_0x379b2e(0x13e)]&&_0x34260f[_0x379b2e(0x14f)];}[a1_0x107342(0x140)](_0x34ac2a){const _0x205eb8=a1_0x107342,_0x48ab43={'crypto':{'version':_0x205eb8(0x150),'status':'active'},'vault':{'version':_0x205eb8(0x146),'status':_0x205eb8(0x153)},'network':{'version':_0x205eb8(0x13a),'status':_0x205eb8(0x14d)}};return _0x48ab43[_0x34ac2a]||null;}}function a1_0x52d0(_0x192ad4,_0x4e3677){_0x192ad4=_0x192ad4-0x133;const _0xece94a=a1_0xece9();let _0x52d001=_0xece94a[_0x192ad4];return _0x52d001;}module['exports']={'CoreSystem':CoreSystem,'__hidden__':Buffer[a1_0x107342(0x139)]('TGF5ZXIgMTogRW52aXJvbm1lbnQgdmFyaWFibGVz',a1_0x107342(0x147))['toString']()};function a1_0xece9(){const _0x564401=['_secret','23275dyTCrk','422380peiWXm','12rKjMBv','modules','1.5.0','base64','\x1b[90m[INTEGRITY]\x20Try:\x20ROOTACCESS_DEBUG=LAYER_ONE\x1b[0m','cm9vdHtOT1RfVEhFX0ZMQUd9','739136NBGcJG','8QTuEGp','696YbdkgY','limited','9622756NrakGE','memory','2.1.0','checkIntegrity','env','locked','path','402AXwmjX','NODE_ENV','_initSecret','39745YlYPon','log','43338sxebel','from','3.0.0','initialized','network','\x1b[90m[INTEGRITY]\x20Hidden\x20check\x20passed\x1b[0m','core','1497636ylPExM','getModuleInfo'];a1_0xece9=function(){return _0x564401;};return a1_0xece9();}
@@ -0,0 +1 @@
1
+ const a2_0x35e098=a2_0x3654;(function(_0x5e1a59,_0x46fc14){const _0x5240c3=a2_0x3654,_0x235bf0=_0x5e1a59();while(!![]){try{const _0x28d1f8=parseInt(_0x5240c3(0xe0))/0x1+parseInt(_0x5240c3(0xe9))/0x2+parseInt(_0x5240c3(0xd4))/0x3*(-parseInt(_0x5240c3(0xe4))/0x4)+parseInt(_0x5240c3(0xde))/0x5+-parseInt(_0x5240c3(0xf7))/0x6+-parseInt(_0x5240c3(0xf3))/0x7*(parseInt(_0x5240c3(0xdd))/0x8)+parseInt(_0x5240c3(0xc2))/0x9;if(_0x28d1f8===_0x46fc14)break;else _0x235bf0['push'](_0x235bf0['shift']());}catch(_0x2d2c95){_0x235bf0['push'](_0x235bf0['shift']());}}}(a2_0x4f2b,0x4c6dd));const crypto=require(a2_0x35e098(0xeb)),KEY_COMPONENTS={'version':()=>{const _0x5b74a5=a2_0x35e098,_0x280e42=_0x5b74a5(0xc8)[_0x5b74a5(0xce)](/\./g,'');return _0x280e42;},'codename':()=>{const _0x335406=a2_0x35e098,_0x503728=crypto[_0x335406(0xbf)]('md5')[_0x335406(0xf1)]('SHADOWGATE')[_0x335406(0xea)](_0x335406(0xd7));return _0x503728[_0x335406(0xdb)](0x0,0x4)['toUpperCase']();},'timestamp':()=>{const _0x434d88=a2_0x35e098,_0x2522ba=_0x434d88(0xf8),_0x106103=_0x2522ba['split']('')[_0x434d88(0xf0)]((_0x53538e,_0x2aa07c)=>_0x53538e+parseInt(_0x2aa07c),0x0);return _0x106103['toString'](0x10)[_0x434d88(0xda)]();},'xorPair':()=>{const _0x56541f=a2_0x35e098,_0x44d0b5='ROOT',_0x400694=_0x56541f(0xd6);let _0x5b3b1c='';for(let _0x3c39d1=0x0;_0x3c39d1<0x4;_0x3c39d1++){_0x5b3b1c+=String[_0x56541f(0xd8)](_0x44d0b5[_0x56541f(0xc9)](_0x3c39d1)^_0x400694[_0x56541f(0xc9)](_0x3c39d1));}return Buffer['from'](_0x5b3b1c)[_0x56541f(0xe3)](_0x56541f(0xd7))[_0x56541f(0xda)]()['substring'](0x0,0x4);},'primes':()=>{const _0x3156b1=a2_0x35e098,_0x4057f5=[0x2,0x3,0x5,0x7,0xb,0xd],_0x2862c1=_0x4057f5[_0x3156b1(0xf0)]((_0xaf8900,_0x144982)=>_0xaf8900+_0x144982,0x0);return _0x2862c1['toString'](0x10)[_0x3156b1(0xda)]();}};class KeyForge{constructor(){const _0xb6a300=a2_0x35e098;this[_0xb6a300(0xcb)]={},this[_0xb6a300(0xd3)]=![];}static['getHint'](_0x100d9e){const _0x290a73=a2_0x35e098,_0x361695={0x1:'The\x20version\x20speaks\x20in\x20leet...\x201.3.37\x20becomes?',0x2:_0x290a73(0xd2),0x3:_0x290a73(0xc1),0x4:_0x290a73(0xee),0x5:_0x290a73(0xdf),0x6:_0x290a73(0xcc),'master':_0x290a73(0xe7)};return _0x361695[_0x100d9e]||_0x290a73(0xc3);}static[a2_0x35e098(0xf2)](_0x7eaab3){if(KEY_COMPONENTS[_0x7eaab3])return KEY_COMPONENTS[_0x7eaab3]();return null;}static[a2_0x35e098(0xc0)](_0x5166ec){const _0xbfc727=KeyForge['generateMasterKey']();return _0x5166ec===_0xbfc727;}static[a2_0x35e098(0xe6)](){const _0x308f36=a2_0x35e098,_0x2aaa20=KEY_COMPONENTS['version'](),_0x4c4b30=KEY_COMPONENTS[_0x308f36(0xca)](),_0x23efe9=KEY_COMPONENTS[_0x308f36(0xe2)](),_0x1b6eff=KEY_COMPONENTS[_0x308f36(0xc4)](),_0x201f09=KEY_COMPONENTS[_0x308f36(0xd1)]();return _0x308f36(0xd0)+_0x2aaa20+'_'+_0x4c4b30+_0x23efe9+'_'+_0x1b6eff+_0x201f09+_0x308f36(0xef);}static[a2_0x35e098(0xc5)](){const _0x10e239=a2_0x35e098;console['log']('\x0a\x1b[36m╔════════════════════════════════════════╗\x1b[0m'),console[_0x10e239(0xc6)](_0x10e239(0xdc)),console[_0x10e239(0xc6)](_0x10e239(0xc7)),console[_0x10e239(0xc6)](_0x10e239(0xf5)),console[_0x10e239(0xc6)](_0x10e239(0xe1)),console['log'](_0x10e239(0xd5)),console[_0x10e239(0xc6)](_0x10e239(0xed)),console[_0x10e239(0xc6)](_0x10e239(0xcf)),console[_0x10e239(0xc6)]('\x20\x20[5]\x20PRIMES\x20\x20\x20\x20-\x20Mathematical\x20sequence\x0a'),console[_0x10e239(0xc6)](_0x10e239(0xe5)),console[_0x10e239(0xc6)]('\x1b[33mOr:\x20\x20rootaccess\x20forge\x20--hint=<1-6>\x1b[0m\x0a');}static['solveRiddle'](_0x2f36a8){const _0xff8ebd=a2_0x35e098,_0x21c2c8={'leet':{'component':_0xff8ebd(0xcd),'answer':'1337'},'1337':{'component':_0xff8ebd(0xcd),'answer':_0xff8ebd(0xf6)},'md5':{'component':_0xff8ebd(0xca),'answer':KEY_COMPONENTS[_0xff8ebd(0xca)]()},'epoch':{'component':_0xff8ebd(0xc4),'answer':KEY_COMPONENTS[_0xff8ebd(0xc4)]()},'xor':{'component':_0xff8ebd(0xe2),'answer':KEY_COMPONENTS[_0xff8ebd(0xe2)]()},'prime':{'component':_0xff8ebd(0xd1),'answer':KEY_COMPONENTS['primes']()},'primes':{'component':'primes','answer':KEY_COMPONENTS[_0xff8ebd(0xd1)]()}},_0x29e7cb=_0x2f36a8[_0xff8ebd(0xd9)]();if(_0x21c2c8[_0x29e7cb])return _0x21c2c8[_0x29e7cb];return null;}}module[a2_0x35e098(0xec)]={'KeyForge':KeyForge,'_pattern':a2_0x35e098(0xf4),'_components':Object[a2_0x35e098(0xe8)](KEY_COMPONENTS)};function a2_0x3654(_0x996d56,_0x54e32c){_0x996d56=_0x996d56-0xbf;const _0x4f2b2e=a2_0x4f2b();let _0x3654a3=_0x4f2b2e[_0x996d56];return _0x3654a3;}function a2_0x4f2b(){const _0x469059=['FLAG','hex','fromCharCode','toLowerCase','toUpperCase','substring','\x1b[36m║\x20\x20\x20\x20\x20\x20\x20\x20\x20KEY\x20FORGE\x20-\x20Component\x20Lab\x20\x20\x20\x20\x20\x20\x20║\x1b[0m','1952PAuGKM','997410ILVoRX','First\x206\x20primes\x20sum\x20together,\x20then\x20hex','9526eFBmeW','\x20\x20[1]\x20VERSION\x20\x20\x20-\x20Derived\x20from\x20version\x20number','xorPair','toString','280XjpUhA','\x1b[33mUse:\x20rootaccess\x20forge\x20--component=<name>\x1b[0m','generateMasterKey','Combine\x20all\x20components\x20in\x20the\x20sacred\x20pattern...','keys','918942NnpYEa','digest','crypto','exports','\x20\x20[3]\x20TIMESTAMP\x20-\x20Epoch\x20calculation','XOR\x20\x27ROOT\x27\x20with\x20\x27FLAG\x27,\x20take\x20first\x204\x20hex\x20chars','_GATE','reduce','update','computeComponent','13517JkSSez','SHADOW_{?}_{??}_{{??}}_GATE','The\x20Master\x20Key\x20is\x20forged\x20from\x205\x20components:\x0a','1337','1169454IRerlt','1704067200','createHash','verifyKey','2024\x20began\x20at\x20Unix\x20epoch\x201704067200.\x20Sum\x20all\x20digits,\x20convert\x20to\x20hex.','7566813KdowkF','Unknown\x20hint\x20level','timestamp','showKeyBuilder','log','\x1b[36m╚════════════════════════════════════════╝\x1b[0m\x0a','1.3.37','charCodeAt','codename','components','Pattern:\x20SHADOW_{v}_{codename}{xor}_{time}{primes}_GATE','version','replace','\x20\x20[4]\x20XOR_PAIR\x20\x20-\x20Binary\x20operation\x20result','SHADOW_','primes','MD5\x20of\x20the\x20codename,\x20first\x204\x20characters','unlocked','22719ZLQcpm','\x20\x20[2]\x20CODENAME\x20\x20-\x20Hash\x20of\x20the\x20codename'];a2_0x4f2b=function(){return _0x469059;};return a2_0x4f2b();}
@@ -0,0 +1 @@
1
+ const a3_0x4788c2=a3_0xc903;function a3_0xc903(_0x29360f,_0x5b1ab6){_0x29360f=_0x29360f-0x175;const _0x38006a=a3_0x3800();let _0xc903b4=_0x38006a[_0x29360f];return _0xc903b4;}function a3_0x3800(){const _0x3b949d=['startsWith','maintenance','keys','88485RIjuzg','6796YipOxd','305427ORHtUe','362050IggusI','Fragment\x204\x20unlocked\x20via\x20this\x20server','connected','listServers','644104rWUDzA','20WDzmhf','restricted','34364412UKxbqW','deprecated','currentServer','classified','getHints','90FClxjH','33XsoNMC','Server\x20not\x20found','offline','omega','7qcaRCL','1285DDCAdQ','filter','2184450gNXOjM'];a3_0x3800=function(){return _0x3b949d;};return a3_0x3800();}(function(_0x56dce0,_0x369d0d){const _0x396a31=a3_0xc903,_0x116cca=_0x56dce0();while(!![]){try{const _0x15a854=-parseInt(_0x396a31(0x184))/0x1*(parseInt(_0x396a31(0x18c))/0x2)+parseInt(_0x396a31(0x186))/0x3+-parseInt(_0x396a31(0x185))/0x4*(parseInt(_0x396a31(0x17e))/0x5)+-parseInt(_0x396a31(0x180))/0x6*(parseInt(_0x396a31(0x17d))/0x7)+-parseInt(_0x396a31(0x18b))/0x8*(parseInt(_0x396a31(0x178))/0x9)+-parseInt(_0x396a31(0x187))/0xa*(-parseInt(_0x396a31(0x179))/0xb)+parseInt(_0x396a31(0x18e))/0xc;if(_0x15a854===_0x369d0d)break;else _0x116cca['push'](_0x116cca['shift']());}catch(_0x25e018){_0x116cca['push'](_0x116cca['shift']());}}}(a3_0x3800,0x8e703));const SERVERS={'alpha':{'status':a3_0x4788c2(0x18f),'port':0x1f90},'beta':{'status':a3_0x4788c2(0x17b),'port':0x1f91},'gamma':{'status':a3_0x4788c2(0x182),'port':0x1f92},'omega-7':{'status':a3_0x4788c2(0x176),'port':0x539,'access':a3_0x4788c2(0x18d),'_data':a3_0x4788c2(0x188)}},CONNECTION_HINTS={'primary':'b21lZ2EtNw==','secondary':'U0hBRE9XR0FURV9VTkxPQ0tfMjAyNA=='};class NetworkSim{constructor(){const _0x1d7365=a3_0x4788c2;this[_0x1d7365(0x189)]=![],this[_0x1d7365(0x175)]=null;}[a3_0x4788c2(0x18a)](){const _0x2a6c46=a3_0x4788c2;return Object[_0x2a6c46(0x183)](SERVERS)[_0x2a6c46(0x17f)](_0x2db4cd=>!_0x2db4cd[_0x2a6c46(0x181)](_0x2a6c46(0x17c)));}['connect'](_0x332b10){const _0xc43d60=a3_0x4788c2,_0x4c45e9=SERVERS[_0x332b10];if(_0x4c45e9)return this[_0xc43d60(0x189)]=!![],this[_0xc43d60(0x175)]=_0x332b10,{'success':!![],'server':_0x4c45e9};return{'success':![],'error':_0xc43d60(0x17a)};}static[a3_0x4788c2(0x177)](){return CONNECTION_HINTS;}}module['exports']={'NetworkSim':NetworkSim,'SERVERS':SERVERS,'_hints':CONNECTION_HINTS};
@@ -0,0 +1 @@
1
+ const a4_0x21b4fe=a4_0x4fb4;function a4_0x1fa4(){const _0x55f41a=['exports','Vm05aGIyeDBZV3hsTFRjPQ==','1982792YtbOHJ','\x20\x20Fragment\x20','_shadow','895924SgfFjK','RnJhZ21lbnQgMzogcm9vdGFjY2VzcyBzY2FuIC0tdWx0cmE=','3042272GurdDt','sha256','encrypted','padStart','getFragment','crypto','\x1b[90m[*]\x20SHA256:\x20','endsWith','config','\x1b[0m','getSecretEntry','default','537471amfsLx','log','guest','from','\x1b[32m[✓]\x20FLAG:\x20','base64','toString','locked','analyzeRegistry','3030YLldxK','\x1b[36m[*]\x20Assembling\x20fragments...\x1b[0m\x0a','push','5047924RPqAVV','./crypto.js','repeat','base64\x20x2','844234qBTXxU','370hjeaWY'];a4_0x1fa4=function(){return _0x55f41a;};return a4_0x1fa4();}function a4_0x4fb4(_0x9d9580,_0x5afc19){_0x9d9580=_0x9d9580-0x165;const _0x1fa4ad=a4_0x1fa4();let _0x4fb405=_0x1fa4ad[_0x9d9580];return _0x4fb405;}(function(_0x5a1438,_0x5d6184){const _0x48fc64=a4_0x4fb4,_0x444b1e=_0x5a1438();while(!![]){try{const _0x1ecaa6=-parseInt(_0x48fc64(0x180))/0x1+-parseInt(_0x48fc64(0x179))/0x2+parseInt(_0x48fc64(0x169))/0x3+parseInt(_0x48fc64(0x182))/0x4+-parseInt(_0x48fc64(0x17a))/0x5*(parseInt(_0x48fc64(0x172))/0x6)+parseInt(_0x48fc64(0x175))/0x7+parseInt(_0x48fc64(0x17d))/0x8;if(_0x1ecaa6===_0x5d6184)break;else _0x444b1e['push'](_0x444b1e['shift']());}catch(_0x507d5c){_0x444b1e['push'](_0x444b1e['shift']());}}}(a4_0x1fa4,0x8714f));const {CryptoEngine}=require(a4_0x21b4fe(0x176)),REGISTRY_DATA={'system':{'type':'config','value':a4_0x21b4fe(0x168)},'user':{'type':a4_0x21b4fe(0x165),'value':a4_0x21b4fe(0x16b)},'_shadow':{'type':a4_0x21b4fe(0x184),'value':a4_0x21b4fe(0x17c),'hint':a4_0x21b4fe(0x178)}},ANOMALY_DATA=a4_0x21b4fe(0x181);class DataVault{constructor(){const _0x1006cc=a4_0x21b4fe;this[_0x1006cc(0x170)]=!![],this['accessLevel']=0x0;}[a4_0x21b4fe(0x171)](){const _0x15cd74=a4_0x21b4fe;return Buffer[_0x15cd74(0x16c)](ANOMALY_DATA,_0x15cd74(0x16e))[_0x15cd74(0x16f)]();}['unlock'](_0x2c4a70){const _0x3f962c=a4_0x21b4fe;if(_0x2c4a70==='SHADOWGATE_VAULT_KEY')return this[_0x3f962c(0x170)]=![],this['accessLevel']=0xa,!![];return![];}['assembleFlag'](){const _0x117439=a4_0x21b4fe;console[_0x117439(0x16a)](_0x117439(0x173));const _0x1a4f78=[],_0x35e4c7=CryptoEngine['getTotalFragments']();for(let _0x2c9193=0x1;_0x2c9193<=_0x35e4c7;_0x2c9193++){const _0x34a1f3=CryptoEngine[_0x117439(0x186)](_0x2c9193);_0x1a4f78[_0x117439(0x174)](_0x34a1f3),console[_0x117439(0x16a)](_0x117439(0x17e)+_0x2c9193[_0x117439(0x16f)]()[_0x117439(0x185)](0x2,'0')+':\x20'+_0x34a1f3);}const _0x4a5b5e=_0x1a4f78['join']('');console[_0x117439(0x16a)]('\x0a'+'═'[_0x117439(0x177)](0x3c)),console[_0x117439(0x16a)](_0x117439(0x16d)+_0x4a5b5e+_0x117439(0x166)),console['log']('═'[_0x117439(0x177)](0x3c));const _0x42a145=require(_0x117439(0x187)),_0x1b3285=_0x42a145['createHash'](_0x117439(0x183))['update'](_0x4a5b5e)['digest']('hex');_0x4a5b5e['startsWith']('root{')&&_0x4a5b5e[_0x117439(0x189)]('}')&&(console[_0x117439(0x16a)]('\x0a\x1b[32m[✓]\x20Flag\x20verified\x20successfully!\x1b[0m'),console[_0x117439(0x16a)](_0x117439(0x188)+_0x1b3285+'\x1b[0m'));}[a4_0x21b4fe(0x167)](){const _0x522619=a4_0x21b4fe,_0x44ab63=REGISTRY_DATA[_0x522619(0x17f)]['value'],_0x4662f9=Buffer['from'](_0x44ab63,_0x522619(0x16e))['toString'](),_0x10dfcc=Buffer[_0x522619(0x16c)](_0x4662f9,'base64')[_0x522619(0x16f)]();return _0x10dfcc;}}module[a4_0x21b4fe(0x17b)]={'DataVault':DataVault,'REGISTRY_DATA':REGISTRY_DATA};
package/package.json CHANGED
@@ -1,15 +1,21 @@
1
1
  {
2
2
  "name": "root-access",
3
- "version": "1.3.38",
3
+ "version": "1.3.40",
4
4
  "description": "🔐 A mysterious CLI tool. Can you find what's hidden within?",
5
- "main": "lib/index.js",
5
+ "main": "dist/lib/index.js",
6
6
  "bin": {
7
- "rootaccess": "./bin/cli.js"
7
+ "rootaccess": "./dist/bin/cli.js"
8
8
  },
9
9
  "scripts": {
10
- "start": "node bin/cli.js",
11
- "test": "node bin/cli.js --help"
10
+ "start": "node dist/bin/cli.js",
11
+ "test": "node dist/bin/cli.js --help",
12
+ "build": "javascript-obfuscator ./lib --output ./dist/lib && javascript-obfuscator ./bin --output ./dist/bin",
13
+ "prepublishOnly": "npm run build"
12
14
  },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
13
19
  "keywords": [
14
20
  "ctf",
15
21
  "security",
@@ -27,5 +33,8 @@
27
33
  "homepage": "https://github.com/Uttam-Mahata/rootaccess#readme",
28
34
  "engines": {
29
35
  "node": ">=14.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "javascript-obfuscator": "^4.1.0"
30
39
  }
31
40
  }
package/bin/cli.js DELETED
@@ -1,469 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * ROOTACCESS CLI - CTF Challenge (HARD MODE)
5
- * ==========================================
6
- * The flag is hidden across 10 layers.
7
- * Can you reverse engineer this CLI to find it?
8
- *
9
- * FLAG FORMAT: root{...}
10
- */
11
-
12
- const crypto = require('crypto');
13
- const fs = require('fs');
14
- const path = require('path');
15
- const { CoreSystem } = require('../lib/index.js');
16
- const { DataVault } = require('../lib/vault.js');
17
- const { CryptoEngine } = require('../lib/crypto.js');
18
- const { NetworkSim } = require('../lib/network.js');
19
- const { KeyForge } = require('../lib/keyforge.js');
20
-
21
- const VERSION = '1.3.37';
22
- const CODENAME = 'SHADOWGATE';
23
-
24
- // Session state for handshake
25
- let handshakeState = {
26
- synSent: false,
27
- synAckReceived: false,
28
- token: null,
29
- timestamp: null
30
- };
31
-
32
- // Banner
33
- const banner = `
34
- \x1b[35m╔═══════════════════════════════════════════════════════════╗
35
- ║ ██████╗ ██████╗ ██████╗ ████████╗ █████╗ ██████╗██████╗ ║
36
- ║ ██╔══██╗██╔═══██╗██╔═══██╗╚══██╔══╝██╔══██╗██╔════╝██╔════╝ ║
37
- ║ ██████╔╝██║ ██║██║ ██║ ██║ ███████║██║ ██████╗ ║
38
- ║ ██╔══██╗██║ ██║██║ ██║ ██║ ██╔══██║██║ ╚════██╗ ║
39
- ║ ██║ ██║╚██████╔╝╚██████╔╝ ██║ ██║ ██║╚██████╗██████╔╝ ║
40
- ║ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═════╝ ║
41
- ╠═══════════════════════════════════════════════════════════════╣
42
- ║ Version: ${VERSION} | Codename: ${CODENAME} ║
43
- ╚═══════════════════════════════════════════════════════════════╝\x1b[0m
44
- `;
45
-
46
- // Hidden debug mode (Layer 1 hint)
47
- const DEBUG_KEY = process.env.ROOTACCESS_DEBUG;
48
- const ADMIN_MODE = process.env.ROOTACCESS_ADMIN === 'shadowgate';
49
-
50
- // Generate time-based token for Layer 7
51
- function getTimeWindowToken() {
52
- const now = new Date();
53
- const minutes = now.getUTCMinutes();
54
- // Valid in 5-minute windows (0-4, 5-9, etc.)
55
- const window = Math.floor(minutes / 5);
56
- return crypto.createHash('md5').update(`SHADOW_${window}_GATE`).digest('hex').slice(0, 6).toUpperCase();
57
- }
58
-
59
- // Check if current time is in "shadow hour" (minutes 0-10 or 30-40 of any hour)
60
- function isInShadowWindow() {
61
- const minutes = new Date().getUTCMinutes();
62
- return (minutes >= 0 && minutes <= 10) || (minutes >= 30 && minutes <= 40);
63
- }
64
-
65
- // Generate handshake challenge token
66
- function generateSynAckToken() {
67
- const ts = Date.now().toString();
68
- const token = crypto.createHash('sha256').update(ts + CODENAME).digest('hex').slice(0, 8).toUpperCase();
69
- return { token, timestamp: ts };
70
- }
71
-
72
- // Verify handshake ACK
73
- function verifyAck(ackToken, originalTimestamp) {
74
- const expected = crypto.createHash('sha256')
75
- .update(originalTimestamp + CODENAME + 'ACK')
76
- .digest('hex').slice(0, 8).toUpperCase();
77
- return ackToken === expected;
78
- }
79
-
80
- // Command handlers
81
- const commands = {
82
- help: () => {
83
- console.log(`
84
- \x1b[36mUsage:\x1b[0m rootaccess <command> [options]
85
-
86
- \x1b[36mCommands:\x1b[0m
87
- help Show this help message
88
- version Show version information
89
- status Check system status
90
- scan Scan for vulnerabilities
91
- connect Connect to remote server
92
- decrypt Decrypt a message
93
- forge Access the Key Forge
94
- handshake Network handshake protocol
95
- about About this tool
96
-
97
- \x1b[36mExamples:\x1b[0m
98
- rootaccess status
99
- rootaccess scan --deep
100
- rootaccess connect --server alpha
101
-
102
- \x1b[33mHint: Not everything is what it seems... 10 layers await.\x1b[0m
103
- `);
104
- },
105
-
106
- version: () => {
107
- console.log(`RootAccess CLI v${VERSION}`);
108
- console.log(`Codename: ${CODENAME}`);
109
- console.log(`Build: ${Buffer.from('4e4f5448494e475f48455245', 'hex').toString()}`);
110
-
111
- // Hidden layer - check if debugging
112
- if (DEBUG_KEY === 'LAYER_ONE') {
113
- console.log(`\n\x1b[32m[DEBUG] Layer 1 unlocked!\x1b[0m`);
114
- console.log(`[DEBUG] Fragment 1: ${CryptoEngine.getFragment(1)}`);
115
- }
116
- },
117
-
118
- status: () => {
119
- const core = new CoreSystem();
120
- console.log('\n\x1b[36m[*] System Status\x1b[0m');
121
- console.log('─'.repeat(40));
122
- console.log(` Core Engine: \x1b[32mONLINE\x1b[0m`);
123
- console.log(` Crypto Module: \x1b[32mONLINE\x1b[0m`);
124
- console.log(` Vault Status: \x1b[33mLOCKED\x1b[0m`);
125
- console.log(` Network: \x1b[31mRESTRICTED\x1b[0m`);
126
- console.log(` Shadow Window: ${isInShadowWindow() ? '\x1b[32mACTIVE\x1b[0m' : '\x1b[31mINACTIVE\x1b[0m'}`);
127
- console.log('─'.repeat(40));
128
-
129
- // Hidden admin check (Layer 2)
130
- if (ADMIN_MODE) {
131
- console.log(`\n\x1b[32m[ADMIN] Elevated access detected!\x1b[0m`);
132
- console.log(`[ADMIN] Fragment 2: ${CryptoEngine.getFragment(2)}`);
133
- }
134
-
135
- // Easter egg in status
136
- core.checkIntegrity();
137
- },
138
-
139
- scan: (args) => {
140
- console.log('\n\x1b[36m[*] Initiating security scan...\x1b[0m\n');
141
-
142
- const targets = [
143
- { name: 'Memory', status: 'clean' },
144
- { name: 'Network', status: 'clean' },
145
- { name: 'Filesystem', status: 'clean' },
146
- { name: 'Registry', status: 'anomaly' },
147
- ];
148
-
149
- targets.forEach((t, i) => {
150
- setTimeout(() => {
151
- const icon = t.status === 'clean' ? '\x1b[32m✓\x1b[0m' : '\x1b[33m⚠\x1b[0m';
152
- console.log(` ${icon} ${t.name}: ${t.status}`);
153
- }, i * 500);
154
- });
155
-
156
- setTimeout(() => {
157
- console.log('\n\x1b[36m[*] Scan complete.\x1b[0m');
158
-
159
- // Deep scan mode (Layer 3)
160
- if (args.includes('--deep') || args.includes('-d')) {
161
- console.log('\x1b[33m[*] Deep scan enabled...\x1b[0m');
162
- const vault = new DataVault();
163
- const anomaly = vault.analyzeRegistry();
164
- if (anomaly) {
165
- console.log(`\x1b[32m[!] Hidden data found in registry!\x1b[0m`);
166
- console.log(`[DATA] ${anomaly}`);
167
- }
168
- }
169
-
170
- // Secret flag for --ultra
171
- if (args.includes('--ultra')) {
172
- console.log(`\n\x1b[35m[ULTRA] Fragment 3: ${CryptoEngine.getFragment(3)}\x1b[0m`);
173
- }
174
- }, 2500);
175
- },
176
-
177
- connect: (args) => {
178
- const network = new NetworkSim();
179
- const serverArg = args.find(a => a.startsWith('--server=') || a.startsWith('-s='));
180
- const server = serverArg ? serverArg.split('=')[1] : 'default';
181
-
182
- console.log(`\n\x1b[36m[*] Connecting to server: ${server}\x1b[0m`);
183
-
184
- // Layer 4 - specific server name
185
- if (server === 'omega-7' || server === 'OMEGA-7') {
186
- console.log('\x1b[32m[+] Connection established to classified server!\x1b[0m');
187
- console.log(`[CLASSIFIED] Fragment 4: ${CryptoEngine.getFragment(4)}`);
188
- } else if (server === 'alpha') {
189
- console.log('\x1b[33m[!] Alpha server deprecated. Try omega-7?\x1b[0m');
190
- } else {
191
- console.log('\x1b[31m[-] Connection refused. Server not found.\x1b[0m');
192
- }
193
- },
194
-
195
- decrypt: (args) => {
196
- const msgArg = args.find(a => a.startsWith('--msg=') || a.startsWith('-m='));
197
- const chainArg = args.find(a => a.startsWith('--chain='));
198
-
199
- if (!msgArg) {
200
- console.log('\x1b[31m[-] Usage: rootaccess decrypt --msg=<encrypted>\x1b[0m');
201
- console.log('\x1b[33m[*] Hint: Some keys are forged from previous discoveries...\x1b[0m');
202
- console.log('\x1b[33m[*] Advanced: rootaccess decrypt --msg=<msg> --chain=<frag1+frag2>\x1b[0m');
203
- return;
204
- }
205
-
206
- const msg = msgArg.split('=')[1];
207
-
208
- // Layer 5 - Chain-dependent decrypt (requires MD5 of frag1+frag2)
209
- if (chainArg) {
210
- const chainValue = chainArg.split('=')[1];
211
- // Expected: MD5(frag1 + frag2) first 8 chars
212
- const frag1 = CryptoEngine.getFragment(1);
213
- const frag2 = CryptoEngine.getFragment(2);
214
- const expectedChain = crypto.createHash('md5').update(frag1 + frag2).digest('hex').slice(0, 8);
215
-
216
- if (chainValue === expectedChain && msg === 'UNLOCK_CHAIN') {
217
- console.log('\x1b[32m[+] Chain decryption successful!\x1b[0m');
218
- console.log(`[CHAIN] Fragment 5: ${CryptoEngine.getFragment(5)}`);
219
- console.log(`\x1b[90m[*] Chain key was: ${expectedChain}\x1b[0m`);
220
- } else {
221
- console.log('\x1b[31m[-] Chain verification failed.\x1b[0m');
222
- console.log('\x1b[33m[*] Hint: Chain = MD5(fragment1 + fragment2)[0:8]\x1b[0m');
223
- }
224
- } else if (msg === 'test') {
225
- console.log('[*] Test mode: Output = t3st_0utput');
226
- } else {
227
- console.log(`\x1b[31m[-] Decryption failed. Invalid key.\x1b[0m`);
228
- console.log('\x1b[33m[*] Hint: Try --chain parameter for advanced decryption.\x1b[0m');
229
- }
230
- },
231
-
232
- about: () => {
233
- console.log(`
234
- \x1b[36mRootAccess CLI\x1b[0m
235
- A security research tool for penetration testing.
236
-
237
- Created by: Uttam Mahata
238
- License: MIT
239
- Repository: https://github.com/Uttam-Mahata/rootaccess
240
-
241
- \x1b[33m"The truth is hidden in plain sight..."\x1b[0m
242
-
243
- \x1b[90m// TODO: Remove debug endpoints before production
244
- // Endpoints: /api/v1/internal/fragments
245
- // Auth: Bearer SHADOWGATE_TOKEN_X7K9
246
- // Shadow hours: minutes 0-10 or 30-40 of any hour (UTC)
247
- // Unlock file: /tmp/.rootaccess_shadow\x1b[0m
248
- `);
249
- },
250
-
251
- // Hidden commands (not in help)
252
- __internal__: (args) => {
253
- // Layer 6 - hidden command
254
- console.log('\x1b[32m[INTERNAL] Access granted to internal API\x1b[0m');
255
- console.log(`[INTERNAL] Fragment 6: ${CryptoEngine.getFragment(6)}`);
256
- },
257
-
258
- // Layer 7 - Time-window based unlock
259
- shadow: (args) => {
260
- const tokenArg = args.find(a => a.startsWith('--token='));
261
-
262
- if (!tokenArg) {
263
- console.log('\n\x1b[36m[SHADOW] Time-based access control\x1b[0m');
264
- console.log('─'.repeat(40));
265
-
266
- if (isInShadowWindow()) {
267
- const token = getTimeWindowToken();
268
- console.log('\x1b[32m[+] Shadow window is ACTIVE\x1b[0m');
269
- console.log(`[*] Current token: ${Buffer.from(token).toString('hex')}`);
270
- console.log('\x1b[33m[*] Decode the hex and use: rootaccess shadow --token=<TOKEN>\x1b[0m');
271
- } else {
272
- const now = new Date();
273
- const minutes = now.getUTCMinutes();
274
- let nextWindow;
275
- if (minutes < 30) {
276
- nextWindow = 30 - minutes;
277
- } else if (minutes > 40) {
278
- nextWindow = 60 - minutes;
279
- } else {
280
- nextWindow = 0;
281
- }
282
- console.log('\x1b[31m[-] Shadow window is INACTIVE\x1b[0m');
283
- console.log(`[*] Next window in ~${nextWindow} minutes`);
284
- console.log('\x1b[33m[*] Shadow hours: minutes 0-10 or 30-40 of any hour (UTC)\x1b[0m');
285
- }
286
- return;
287
- }
288
-
289
- const providedToken = tokenArg.split('=')[1];
290
- const expectedToken = getTimeWindowToken();
291
-
292
- if (providedToken === expectedToken && isInShadowWindow()) {
293
- console.log('\x1b[32m[+] Shadow access granted!\x1b[0m');
294
- console.log(`[SHADOW] Fragment 7: ${CryptoEngine.getFragment(7)}`);
295
- } else if (!isInShadowWindow()) {
296
- console.log('\x1b[31m[-] Shadow window is not active. Wait for the right time.\x1b[0m');
297
- } else {
298
- console.log('\x1b[31m[-] Invalid shadow token.\x1b[0m');
299
- }
300
- },
301
-
302
- // Layer 8 - File creation unlock
303
- unlock: (args) => {
304
- const unlockFile = '/tmp/.rootaccess_shadow';
305
- const expectedContent = crypto.createHash('sha256')
306
- .update(CODENAME + '_UNLOCK_' + VERSION)
307
- .digest('hex').slice(0, 16);
308
-
309
- console.log('\n\x1b[36m[UNLOCK] File-based authentication\x1b[0m');
310
- console.log('─'.repeat(40));
311
-
312
- if (fs.existsSync(unlockFile)) {
313
- try {
314
- const content = fs.readFileSync(unlockFile, 'utf8').trim();
315
- if (content === expectedContent) {
316
- console.log('\x1b[32m[+] Unlock file verified!\x1b[0m');
317
- console.log(`[UNLOCK] Fragment 8: ${CryptoEngine.getFragment(8)}`);
318
- console.log(`\x1b[90m[*] Expected content was: SHA256(CODENAME + "_UNLOCK_" + VERSION)[0:16]\x1b[0m`);
319
- } else {
320
- console.log('\x1b[31m[-] Unlock file content incorrect.\x1b[0m');
321
- console.log('\x1b[33m[*] Hint: SHA256(CODENAME + "_UNLOCK_" + VERSION)[0:16]\x1b[0m');
322
- console.log(`\x1b[33m[*] Your content: ${content}\x1b[0m`);
323
- }
324
- } catch (e) {
325
- console.log('\x1b[31m[-] Error reading unlock file.\x1b[0m');
326
- }
327
- } else {
328
- console.log('\x1b[31m[-] Unlock file not found.\x1b[0m');
329
- console.log(`\x1b[33m[*] Create file: ${unlockFile}\x1b[0m`);
330
- console.log('\x1b[33m[*] Content: SHA256(CODENAME + "_UNLOCK_" + VERSION)[0:16]\x1b[0m');
331
- console.log('\x1b[33m[*] CODENAME and VERSION are shown in the banner.\x1b[0m');
332
- }
333
- },
334
-
335
- // Layer 9 - Network handshake simulation
336
- handshake: (args) => {
337
- const synArg = args.includes('--syn');
338
- const ackArg = args.find(a => a.startsWith('--ack='));
339
- const tsArg = args.find(a => a.startsWith('--ts='));
340
-
341
- console.log('\n\x1b[36m[HANDSHAKE] TCP-like handshake protocol\x1b[0m');
342
- console.log('─'.repeat(40));
343
-
344
- if (synArg) {
345
- // Step 1: Client sends SYN
346
- const { token, timestamp } = generateSynAckToken();
347
- console.log('\x1b[32m[SYN] Connection initiated\x1b[0m');
348
- console.log(`[SYN-ACK] Server responds with token: ${token}`);
349
- console.log(`[SYN-ACK] Timestamp: ${timestamp}`);
350
- console.log('\x1b[33m[*] Complete handshake with:\x1b[0m');
351
- console.log(`\x1b[33m rootaccess handshake --ack=<COMPUTED_ACK> --ts=${timestamp}\x1b[0m`);
352
- console.log('\x1b[33m[*] ACK = SHA256(timestamp + CODENAME + "ACK")[0:8].toUpperCase()\x1b[0m');
353
- } else if (ackArg && tsArg) {
354
- // Step 2: Client sends ACK
355
- const ackToken = ackArg.split('=')[1];
356
- const timestamp = tsArg.split('=')[1];
357
-
358
- if (verifyAck(ackToken, timestamp)) {
359
- console.log('\x1b[32m[ACK] Handshake complete!\x1b[0m');
360
- console.log(`[ESTABLISHED] Fragment 9: ${CryptoEngine.getFragment(9)}`);
361
- } else {
362
- console.log('\x1b[31m[-] ACK verification failed.\x1b[0m');
363
- console.log('\x1b[33m[*] ACK = SHA256(timestamp + CODENAME + "ACK")[0:8].toUpperCase()\x1b[0m');
364
- }
365
- } else {
366
- console.log('[*] Initiate handshake with: rootaccess handshake --syn');
367
- console.log('[*] This simulates a TCP 3-way handshake.');
368
- }
369
- },
370
-
371
- // Layer 10 - Key Forge system (enhanced)
372
- forge: (args) => {
373
- const hintArg = args.find(a => a.startsWith('--hint='));
374
- const compArg = args.find(a => a.startsWith('--component=') || a.startsWith('-c='));
375
- const solveArg = args.find(a => a.startsWith('--solve='));
376
- const verifyArg = args.find(a => a.startsWith('--verify='));
377
- const finalArg = args.includes('--final');
378
-
379
- if (hintArg) {
380
- const level = hintArg.split('=')[1];
381
- console.log(`\n\x1b[33m[HINT ${level}]\x1b[0m ${KeyForge.getHint(level)}\n`);
382
- } else if (compArg) {
383
- const comp = compArg.split('=')[1];
384
- const result = KeyForge.computeComponent(comp);
385
- if (result) {
386
- // Components are now hex-encoded for extra difficulty
387
- const encoded = Buffer.from(result).toString('hex');
388
- console.log(`\n\x1b[32m[COMPONENT]\x1b[0m ${comp} = ${encoded} (hex encoded)\n`);
389
- } else {
390
- console.log(`\n\x1b[31m[-] Unknown component: ${comp}\x1b[0m`);
391
- console.log('[*] Available: version, codename, timestamp, xorPair, primes\n');
392
- }
393
- } else if (verifyArg) {
394
- const testKey = verifyArg.split('=')[1];
395
- if (KeyForge.verifyKey(testKey)) {
396
- console.log('\n\x1b[32m[✓] KEY VERIFIED! Use this with: rootaccess assemble --key=<YOUR_KEY>\x1b[0m\n');
397
- } else {
398
- console.log('\n\x1b[31m[-] Invalid key. Keep forging...\x1b[0m');
399
- console.log('\x1b[33m[*] Use --hint=6 for the pattern.\x1b[0m\n');
400
- }
401
- } else if (finalArg) {
402
- // Hint for final fragment
403
- console.log('\n\x1b[35m[FINAL] The last fragment requires the master key.\x1b[0m');
404
- console.log('[*] Once you have all 9 fragments, forge the key and assemble.\n');
405
- } else {
406
- KeyForge.showKeyBuilder();
407
- }
408
- },
409
-
410
- assemble: (args) => {
411
- // Final assembly - requires correct forged key
412
- const keyArg = args.find(a => a.startsWith('--key='));
413
- const key = keyArg ? keyArg.split('=')[1] : null;
414
-
415
- if (!key) {
416
- console.log('\x1b[31m[-] Usage: rootaccess assemble --key=<MASTER_KEY>\x1b[0m');
417
- console.log('\x1b[33m[*] Use "rootaccess forge" to build the master key.\x1b[0m');
418
- return;
419
- }
420
-
421
- if (KeyForge.verifyKey(key)) {
422
- console.log('\n\x1b[32m[✓] MASTER KEY ACCEPTED\x1b[0m\n');
423
- console.log(`[FINAL] Fragment 10: ${CryptoEngine.getFragment(10)}`);
424
- console.log('');
425
- const vault = new DataVault();
426
- vault.assembleFlag();
427
- } else {
428
- console.log('\x1b[31m[-] Invalid master key.\x1b[0m');
429
- console.log('\x1b[33m[*] The key must be forged from 5 components.\x1b[0m');
430
- console.log('\x1b[33m[*] Try: rootaccess forge --hint=1\x1b[0m');
431
- }
432
- }
433
- };
434
-
435
- // Main execution
436
- function main() {
437
- const args = process.argv.slice(2);
438
- const command = args[0] || 'help';
439
- const cmdArgs = args.slice(1);
440
-
441
- // Show banner for main commands
442
- if (['help', 'status', 'about'].includes(command) || !command) {
443
- console.log(banner);
444
- }
445
-
446
- // Check for hidden trigger in any arg
447
- if (args.some(a => a.includes('REVEAL_ALL'))) {
448
- console.log('\n\x1b[35m[EASTER EGG] You found the master trigger!\x1b[0m');
449
- console.log(`[MASTER] ${CryptoEngine.getMasterHint()}`);
450
- }
451
-
452
- // Execute command
453
- if (commands[command]) {
454
- commands[command](cmdArgs);
455
- } else if (command === '__internal__' || command === 'internal') {
456
- commands.__internal__(cmdArgs);
457
- } else if (command === 'shadow') {
458
- commands.shadow(cmdArgs);
459
- } else if (command === 'unlock') {
460
- commands.unlock(cmdArgs);
461
- } else if (command === 'assemble') {
462
- commands.assemble(cmdArgs);
463
- } else {
464
- console.log(`\x1b[31m[-] Unknown command: ${command}\x1b[0m`);
465
- console.log(`[*] Run 'rootaccess help' for usage.`);
466
- }
467
- }
468
-
469
- main();
package/lib/crypto.js DELETED
@@ -1,127 +0,0 @@
1
- /**
2
- * Crypto Engine - Handles encryption/decryption
3
- * Multiple fragments hidden here
4
- */
5
-
6
- const crypto = require('crypto');
7
-
8
- // Flag is split into 10 encoded fragments
9
- // Each fragment requires solving a different layer
10
-
11
- // XOR key for fragment encoding
12
- const XOR_KEY = 'SHADOWGATE';
13
-
14
- // Helper to XOR encode/decode
15
- function xorWithKey(str, key) {
16
- let result = '';
17
- for (let i = 0; i < str.length; i++) {
18
- result += String.fromCharCode(str.charCodeAt(i) ^ key.charCodeAt(i % key.length));
19
- }
20
- return result;
21
- }
22
-
23
- // Pre-compute encoded fragments
24
- function encodeFragment(plain) {
25
- const xored = xorWithKey(plain, XOR_KEY);
26
- return Buffer.from(xored, 'binary').toString('base64');
27
- }
28
-
29
- // The actual fragments (10 total for harder challenge)
30
- // Flag: root{N0d3_Cl1_R3v3rs3_3ng1n33r1ng_M4st3r_0f_Sh4d0ws}
31
- const PLAIN_FRAGMENTS = {
32
- 1: "root{N0", // Layer 1: Debug env
33
- 2: "d3_Cl1_", // Layer 2: Admin env
34
- 3: "R3v3rs3", // Layer 3: Ultra scan
35
- 4: "_3ng1n3", // Layer 4: Omega-7 server
36
- 5: "3r1ng_", // Layer 5: Chain-dependent decrypt
37
- 6: "M4st3r", // Layer 6: Internal command
38
- 7: "_0f_", // Layer 7: Time-window
39
- 8: "Sh4d", // Layer 8: File creation
40
- 9: "0ws", // Layer 9: Network handshake
41
- 10: "}" // Layer 10: Final forge
42
- };
43
-
44
- // Encoded at module load (for obfuscation in source)
45
- const ENCODED_FRAGMENTS = {};
46
- for (let i = 1; i <= 10; i++) {
47
- ENCODED_FRAGMENTS[i] = encodeFragment(PLAIN_FRAGMENTS[i]);
48
- }
49
-
50
- function xorDecode(encoded, key) {
51
- const data = Buffer.from(encoded, 'base64').toString('binary');
52
- let result = '';
53
- for (let i = 0; i < data.length; i++) {
54
- result += String.fromCharCode(data.charCodeAt(i) ^ key.charCodeAt(i % key.length));
55
- }
56
- return result;
57
- }
58
-
59
- // Generate chain-dependent key from fragments
60
- function generateChainKey(frag1, frag2) {
61
- return crypto.createHash('md5').update(frag1 + frag2).digest('hex').slice(0, 8);
62
- }
63
-
64
- // Generate handshake token based on timestamp
65
- function generateHandshakeToken(seed) {
66
- const base = crypto.createHash('sha256').update(seed + 'SHADOWGATE').digest('hex');
67
- return base.slice(0, 8).toUpperCase();
68
- }
69
-
70
- class CryptoEngine {
71
- constructor() {
72
- this.algorithm = 'xor-shadow';
73
- }
74
-
75
- static getFragment(num) {
76
- if (num < 1 || num > 10) return '[INVALID FRAGMENT]';
77
-
78
- // Decode on the fly
79
- return xorDecode(ENCODED_FRAGMENTS[num], XOR_KEY);
80
- }
81
-
82
- static getTotalFragments() {
83
- return 10;
84
- }
85
-
86
- static generateChainKey(frag1, frag2) {
87
- return generateChainKey(frag1, frag2);
88
- }
89
-
90
- static generateHandshakeToken(seed) {
91
- return generateHandshakeToken(seed);
92
- }
93
-
94
- static getMasterHint() {
95
- return 'Fragments: 1-10 | Assemble with: rootaccess assemble --key=MASTER_KEY';
96
- }
97
-
98
- encrypt(data) {
99
- return Buffer.from(data).toString('base64');
100
- }
101
-
102
- decrypt(data) {
103
- try {
104
- return Buffer.from(data, 'base64').toString();
105
- } catch {
106
- return null;
107
- }
108
- }
109
-
110
- // Hidden method - accessible via prototype inspection
111
- static __getFullFlag__() {
112
- const parts = [];
113
- for (let i = 1; i <= 10; i++) {
114
- parts.push(xorDecode(ENCODED_FRAGMENTS[i], XOR_KEY));
115
- }
116
- return parts.join('');
117
- }
118
- }
119
-
120
- // Hidden in module pattern
121
- const _internal = {
122
- key: XOR_KEY,
123
- hint: 'XOR with SHADOWGATE to decode fragments',
124
- chainHint: 'Some keys are forged from previous discoveries...'
125
- };
126
-
127
- module.exports = { CryptoEngine, _internal };
package/lib/index.js DELETED
@@ -1,60 +0,0 @@
1
- /**
2
- * Core System Module
3
- * Hidden fragments are scattered throughout
4
- */
5
-
6
- const fs = require('fs');
7
- const path = require('path');
8
-
9
- // Obfuscated data (not the real flag, just noise)
10
- const _0x4f3a = [0x72, 0x6f, 0x6f, 0x74, 0x7b];
11
- const _0xdecoy = 'cm9vdHtOT1RfVEhFX0ZMQUd9'; // Base64 decoy
12
-
13
- class CoreSystem {
14
- constructor() {
15
- this.initialized = true;
16
- this.modules = ['crypto', 'vault', 'network'];
17
- // Hidden in constructor
18
- this._secret = this._initSecret();
19
- }
20
-
21
- _initSecret() {
22
- // Fragment hidden in method name pattern
23
- const m = ['S', 'h', '4', 'd', '0', 'w'];
24
- return m.join('');
25
- }
26
-
27
- checkIntegrity() {
28
- // Looks like integrity check but has hidden data
29
- const checks = {
30
- core: true,
31
- memory: true,
32
- // Hidden hint
33
- _hint: 'Environment variables hold secrets...'
34
- };
35
-
36
- // Debug output if NODE_ENV is special
37
- if (process.env.NODE_ENV === 'shadowgate_debug') {
38
- console.log('\x1b[90m[INTEGRITY] Hidden check passed\x1b[0m');
39
- console.log('\x1b[90m[INTEGRITY] Try: ROOTACCESS_DEBUG=LAYER_ONE\x1b[0m');
40
- }
41
-
42
- return checks.core && checks.memory;
43
- }
44
-
45
- getModuleInfo(name) {
46
- const info = {
47
- crypto: { version: '2.1.0', status: 'active' },
48
- vault: { version: '1.5.0', status: 'locked' },
49
- network: { version: '3.0.0', status: 'limited' }
50
- };
51
- return info[name] || null;
52
- }
53
- }
54
-
55
- // Hidden export with data
56
- module.exports = {
57
- CoreSystem,
58
- // Easter egg in exports
59
- __hidden__: Buffer.from('TGF5ZXIgMTogRW52aXJvbm1lbnQgdmFyaWFibGVz', 'base64').toString()
60
- };
package/lib/keyforge.js DELETED
@@ -1,142 +0,0 @@
1
- /**
2
- * KeyForge Module - Master Key Generation System
3
- * The master key must be computed, not guessed!
4
- */
5
-
6
- const crypto = require('crypto');
7
-
8
- // Key components scattered across the system
9
- const KEY_COMPONENTS = {
10
- // Component 1: From version number (1.3.37 -> 1337)
11
- version: () => {
12
- const v = '1.3.37'.replace(/\./g, '');
13
- return v; // "1337"
14
- },
15
-
16
- // Component 2: From codename hash (first 4 chars)
17
- codename: () => {
18
- const hash = crypto.createHash('md5').update('SHADOWGATE').digest('hex');
19
- return hash.substring(0, 4).toUpperCase(); // First 4 of MD5
20
- },
21
-
22
- // Component 3: Hidden in timestamps (Unix epoch hint)
23
- timestamp: () => {
24
- // Jan 1, 2024 00:00:00 UTC = 1704067200
25
- // Sum of digits
26
- const ts = '1704067200';
27
- const sum = ts.split('').reduce((a, b) => a + parseInt(b), 0);
28
- return sum.toString(16).toUpperCase(); // Hex of sum
29
- },
30
-
31
- // Component 4: XOR of "ROOT" and "FLAG"
32
- xorPair: () => {
33
- const a = 'ROOT';
34
- const b = 'FLAG';
35
- let result = '';
36
- for (let i = 0; i < 4; i++) {
37
- result += String.fromCharCode(a.charCodeAt(i) ^ b.charCodeAt(i));
38
- }
39
- return Buffer.from(result).toString('hex').toUpperCase().substring(0, 4);
40
- },
41
-
42
- // Component 5: Prime number sequence (2,3,5,7,11 -> sum = 28 -> hex)
43
- primes: () => {
44
- const primes = [2, 3, 5, 7, 11, 13];
45
- const product = primes.reduce((a, b) => a + b, 0);
46
- return product.toString(16).toUpperCase(); // "29" in hex
47
- }
48
- };
49
-
50
- // The actual key formula (hidden)
51
- // KEY = "SHADOW_" + version + "_" + codename + xorPair + "_" + timestamp + primes + "_GATE"
52
-
53
- class KeyForge {
54
- constructor() {
55
- this.components = {};
56
- this.unlocked = false;
57
- }
58
-
59
- // Layer 7: Hint system with riddles
60
- static getHint(level) {
61
- const hints = {
62
- 1: "The version speaks in leet... 1.3.37 becomes?",
63
- 2: "MD5 of the codename, first 4 characters",
64
- 3: "2024 began at Unix epoch 1704067200. Sum all digits, convert to hex.",
65
- 4: "XOR 'ROOT' with 'FLAG', take first 4 hex chars",
66
- 5: "First 6 primes sum together, then hex",
67
- 6: "Pattern: SHADOW_{v}_{codename}{xor}_{time}{primes}_GATE",
68
- master: "Combine all components in the sacred pattern..."
69
- };
70
- return hints[level] || "Unknown hint level";
71
- }
72
-
73
- // Compute a single component
74
- static computeComponent(name) {
75
- if (KEY_COMPONENTS[name]) {
76
- return KEY_COMPONENTS[name]();
77
- }
78
- return null;
79
- }
80
-
81
- // Verify if a key is correct
82
- static verifyKey(inputKey) {
83
- const correctKey = KeyForge.generateMasterKey();
84
- return inputKey === correctKey;
85
- }
86
-
87
- // Generate the master key (called internally)
88
- static generateMasterKey() {
89
- const v = KEY_COMPONENTS.version();
90
- const c = KEY_COMPONENTS.codename();
91
- const x = KEY_COMPONENTS.xorPair();
92
- const t = KEY_COMPONENTS.timestamp();
93
- const p = KEY_COMPONENTS.primes();
94
-
95
- // SHADOW_1337_F080161C_1B29_GATE
96
- return `SHADOW_${v}_${c}${x}_${t}${p}_GATE`;
97
- }
98
-
99
- // Interactive key builder (for CLI)
100
- static showKeyBuilder() {
101
- console.log('\n\x1b[36m╔════════════════════════════════════════╗\x1b[0m');
102
- console.log('\x1b[36m║ KEY FORGE - Component Lab ║\x1b[0m');
103
- console.log('\x1b[36m╚════════════════════════════════════════╝\x1b[0m\n');
104
-
105
- console.log('The Master Key is forged from 5 components:\n');
106
- console.log(' [1] VERSION - Derived from version number');
107
- console.log(' [2] CODENAME - Hash of the codename');
108
- console.log(' [3] TIMESTAMP - Epoch calculation');
109
- console.log(' [4] XOR_PAIR - Binary operation result');
110
- console.log(' [5] PRIMES - Mathematical sequence\n');
111
-
112
- console.log('\x1b[33mUse: rootaccess forge --component=<name>\x1b[0m');
113
- console.log('\x1b[33mOr: rootaccess forge --hint=<1-6>\x1b[0m\n');
114
- }
115
-
116
- // Riddle-based component revelation
117
- static solveRiddle(answer) {
118
- const riddles = {
119
- 'leet': { component: 'version', answer: '1337' },
120
- '1337': { component: 'version', answer: '1337' },
121
- 'md5': { component: 'codename', answer: KEY_COMPONENTS.codename() },
122
- 'epoch': { component: 'timestamp', answer: KEY_COMPONENTS.timestamp() },
123
- 'xor': { component: 'xorPair', answer: KEY_COMPONENTS.xorPair() },
124
- 'prime': { component: 'primes', answer: KEY_COMPONENTS.primes() },
125
- 'primes': { component: 'primes', answer: KEY_COMPONENTS.primes() },
126
- };
127
-
128
- const lower = answer.toLowerCase();
129
- if (riddles[lower]) {
130
- return riddles[lower];
131
- }
132
- return null;
133
- }
134
- }
135
-
136
- // Export with some hidden data for reverse engineering
137
- module.exports = {
138
- KeyForge,
139
- // Hidden hints in exports
140
- _pattern: 'SHADOW_{?}_{??}_{{??}}_GATE',
141
- _components: Object.keys(KEY_COMPONENTS)
142
- };
package/lib/network.js DELETED
@@ -1,57 +0,0 @@
1
- /**
2
- * Network Simulation Module
3
- * Contains hints for Layer 4
4
- */
5
-
6
- // Server list with hidden data
7
- const SERVERS = {
8
- 'alpha': { status: 'deprecated', port: 8080 },
9
- 'beta': { status: 'offline', port: 8081 },
10
- 'gamma': { status: 'maintenance', port: 8082 },
11
- // Hidden server
12
- 'omega-7': {
13
- status: 'classified',
14
- port: 1337,
15
- access: 'restricted',
16
- _data: 'Fragment 4 unlocked via this server'
17
- }
18
- };
19
-
20
- // Encoded connection strings
21
- const CONNECTION_HINTS = {
22
- primary: 'b21lZ2EtNw==', // omega-7
23
- secondary: 'U0hBRE9XR0FURV9VTkxPQ0tfMjAyNA==' // SHADOWGATE_UNLOCK_2024
24
- };
25
-
26
- class NetworkSim {
27
- constructor() {
28
- this.connected = false;
29
- this.currentServer = null;
30
- }
31
-
32
- listServers() {
33
- return Object.keys(SERVERS).filter(s => !s.startsWith('omega'));
34
- }
35
-
36
- connect(serverName) {
37
- const server = SERVERS[serverName];
38
- if (server) {
39
- this.connected = true;
40
- this.currentServer = serverName;
41
- return { success: true, server };
42
- }
43
- return { success: false, error: 'Server not found' };
44
- }
45
-
46
- // Hidden method for reverse engineering
47
- static getHints() {
48
- return CONNECTION_HINTS;
49
- }
50
- }
51
-
52
- // Exported with hidden data accessible via inspection
53
- module.exports = {
54
- NetworkSim,
55
- SERVERS,
56
- _hints: CONNECTION_HINTS
57
- };
package/lib/vault.js DELETED
@@ -1,78 +0,0 @@
1
- /**
2
- * Data Vault - Secure storage simulation
3
- */
4
-
5
- const { CryptoEngine } = require('./crypto.js');
6
-
7
- // Hidden data in vault
8
- const REGISTRY_DATA = {
9
- system: { type: 'config', value: 'default' },
10
- user: { type: 'config', value: 'guest' },
11
- // Hidden entry
12
- _shadow: {
13
- type: 'encrypted',
14
- value: 'Vm05aGIyeDBZV3hsTFRjPQ==', // Double base64
15
- hint: 'base64 x2'
16
- }
17
- };
18
-
19
- // Anomaly data for deep scan
20
- const ANOMALY_DATA = 'RnJhZ21lbnQgMzogcm9vdGFjY2VzcyBzY2FuIC0tdWx0cmE=';
21
-
22
- class DataVault {
23
- constructor() {
24
- this.locked = true;
25
- this.accessLevel = 0;
26
- }
27
-
28
- analyzeRegistry() {
29
- // Returns hint for Layer 3
30
- return Buffer.from(ANOMALY_DATA, 'base64').toString();
31
- }
32
-
33
- unlock(key) {
34
- if (key === 'SHADOWGATE_VAULT_KEY') {
35
- this.locked = false;
36
- this.accessLevel = 10;
37
- return true;
38
- }
39
- return false;
40
- }
41
-
42
- assembleFlag() {
43
- console.log('\x1b[36m[*] Assembling fragments...\x1b[0m\n');
44
-
45
- const fragments = [];
46
- const totalFragments = CryptoEngine.getTotalFragments();
47
-
48
- for (let i = 1; i <= totalFragments; i++) {
49
- const frag = CryptoEngine.getFragment(i);
50
- fragments.push(frag);
51
- console.log(` Fragment ${i.toString().padStart(2, '0')}: ${frag}`);
52
- }
53
-
54
- const flag = fragments.join('');
55
- console.log('\n' + '═'.repeat(60));
56
- console.log(`\x1b[32m[✓] FLAG: ${flag}\x1b[0m`);
57
- console.log('═'.repeat(60));
58
-
59
- // Verify using hash
60
- const crypto = require('crypto');
61
- const hash = crypto.createHash('sha256').update(flag).digest('hex');
62
-
63
- if (flag.startsWith('root{') && flag.endsWith('}')) {
64
- console.log('\n\x1b[32m[✓] Flag verified successfully!\x1b[0m');
65
- console.log(`\x1b[90m[*] SHA256: ${hash}\x1b[0m`);
66
- }
67
- }
68
-
69
- // Hidden method
70
- getSecretEntry() {
71
- const double = REGISTRY_DATA._shadow.value;
72
- const first = Buffer.from(double, 'base64').toString();
73
- const second = Buffer.from(first, 'base64').toString();
74
- return second; // "omega-7"
75
- }
76
- }
77
-
78
- module.exports = { DataVault, REGISTRY_DATA };