n4tuss3c

csDEPLOY.cmd

Jan 11th, 2022 (edited)
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.51 KB | None | 0 0
  1. :: Name:     csDEPLOY.cmd
  2. :: Purpose:  Silently deploys Crowdstrike Agent
  3. :: Author:  
  4. :: Revision: 1.1
  5.  
  6. ::build the environment
  7. @ECHO OFF
  8. SETLOCAL
  9. SET DESKTOP=%USERPROFILE%\Desktop\
  10. title Crowdstrike Rapid Installer
  11.  
  12.  
  13. ::check for root
  14. echo Are you root? Don't worry, we're checking...
  15. TIMEOUT >nul 2>&1 5
  16. net session >nul 2>&1
  17. if %errorlevel% == 0 (
  18.   echo You ARE root! Isn't that nice. We will proceed...
  19.   TIMEOUT >nul 2>&1 10
  20.   goto CHECKINSTALLSTATE
  21. ) else (
  22.   echo Your XP is too weak! Level up n00b and try again...
  23.   TIMEOUT >nul 2>&1 7
  24.   EXIT
  25. )
  26.  
  27. ::check for installation
  28. :CHECKINSTALLSTATE
  29. SET _serviceName="CSFalconService"
  30. sc interrogate %_serviceName% >nul 2>&1
  31. if errorlevel 1060 (
  32.   goto RAPIDINSTALLER
  33. ) else (
  34.   goto ALREADYINSTALLED
  35. )
  36.  
  37. ::installation sequence
  38. :RAPIDINSTALLER
  39. pushd <path to crowdstrike installer>
  40. copy WindowsSensor.exe %DESKTOP% >nul 2>&1
  41. popd
  42. echo Crowdstrike is installing - shadow eyes will be watching you soon!
  43. echo We'll need a minute or two...
  44. echo                     ./-`   -`
  45. echo                      `/+-` `/-`
  46. echo                      `../o/.`-//.`
  47. echo                       ./-.-++/-.:+/-.`
  48. echo                        `-//-.:++/--/oo+/-.``
  49. echo                           .://:--:+:.:osssso+/:-.``
  50. echo                              `-:/:--:-.ossssssssso+/-`
  51. echo                                  `.::-`.+sssssssssssso/`
  52. echo                               ``    `.. `/sssssssssssso`
  53. echo                               `---..:-.` `-+ssssssssss/.``
  54. echo                                 `.-:/oo+:-.-:/+ooooooooooo+:`
  55. echo                                      ``.-:--:++++ooooooooooo+-
  56. echo                                             `-+ssssssso+/:---/.
  57. echo                                              `-+osss+:-.`     `
  58. echo                                                `-::/s-..:
  59. echo                                                    `..
  60. echo  _____ _____ _____ _ _ _ ____  _____ _____ _____ _____ _____ _____
  61. echo ^|     ^| __  ^|     ^| ^| ^| ^|    \^|   __^|_   _^| __  ^|     ^|  ^|  ^|   __^|
  62. echo ^|   --^|    -^|  ^|  ^| ^| ^| ^|  ^|  ^|__   ^| ^| ^| ^|    -^|-   -^|    -^|   __^|
  63. echo ^|_____^|__^|__^|_____^|_____^|____/^|_____^| ^|_^| ^|__^|__^|_____^|__^|__^|_____^|
  64. echo *******************************************************************
  65. ::execute installer script and log installation
  66. %DESKTOP%WindowsSensor.exe /install /quiet /norestart ProvNoWait=1 CID=<get from admin>
  67. ::validate installation
  68. sc interrogate %_serviceName% >nul 2>&1
  69. if errorlevel 1060 (
  70.   ECHO Something went sideways. Please contact your SecOps Shadow Broker, immediately!
  71.   ECHO Your SecOps Shadow Broker is <your name here>. Contact <your name here>.
  72.   TIMEOUT >nul 2>&1 300
  73. ) else (
  74.   goto LOG
  75. )
  76.  
  77.  
  78. :LOG
  79. pushd <path to crowdstrike installer>
  80. echo %computername%_%date% >> installations.txt
  81. popd
  82. goto END
  83.  
  84.  
  85. :ALREADYINSTALLED
  86. echo Crowdstrike is already installed - we're already watching you...? We're back to the shadows in...moments...
  87. echo                     ./-`   -`
  88. echo                      `/+-` `/-`
  89. echo                      `../o/.`-//.`
  90. echo                       ./-.-++/-.:+/-.`
  91. echo                        `-//-.:++/--/oo+/-.``
  92. echo                           .://:--:+:.:osssso+/:-.``
  93. echo                              `-:/:--:-.ossssssssso+/-`
  94. echo                                  `.::-`.+sssssssssssso/`
  95. echo                               ``    `.. `/sssssssssssso`
  96. echo                               `---..:-.` `-+ssssssssss/.``
  97. echo                                 `.-:/oo+:-.-:/+ooooooooooo+:`
  98. echo                                      ``.-:--:++++ooooooooooo+-
  99. echo                                             `-+ssssssso+/:---/.
  100. echo                                              `-+osss+:-.`     `
  101. echo                                                `-::/s-..:
  102. echo                                                    `..
  103. echo  _____ _____ _____ _ _ _ ____  _____ _____ _____ _____ _____ _____
  104. echo ^|     ^| __  ^|     ^| ^| ^| ^|    \^|   __^|_   _^| __  ^|     ^|  ^|  ^|   __^|
  105. echo ^|   --^|    -^|  ^|  ^| ^| ^| ^|  ^|  ^|__   ^| ^| ^| ^|    -^|-   -^|    -^|   __^|
  106. echo ^|_____^|__^|__^|_____^|_____^|____/^|_____^| ^|_^| ^|__^|__^|_____^|__^|__^|_____^|
  107. echo *******************************************************************
  108. TIMEOUT >nul 2>&1 8
  109. EXIT
  110.  
  111.  
  112. :END
  113. echo Crowdstrike is installed. We're watching you now... Refrain from childlike behavior. We'll know.
  114. DEL %DESKTOP%WindowsSensor.exe >nul 2>&1
  115. TIMEOUT >nul 2>&1 8
  116. EXIT
  117.  
Advertisement
Add Comment
Please, Sign In to add comment