Wipe a Disk through the Gateway
How to initiate OS Deployment virtual boot via policy
If you want to remotely wipe a disk through the management gateway, this should do the trick. The basic method is to use the same process that allows OS Deployment to do virtual boot deployment jobs against managed clients; therefore, scope could be broadened to even do a full OS Deployment to a remote machine without VPN.
First, we create a .bat file; in this case we're going to put the evil action into the image, so the batch file is very simple:
set LDMS_CLIENT_DIR=c:\progra~1\landesk\ldclientThe four sections of the file will set variable names, download the image file and some utilities, start the reboot, and report success to the policy agent.
set CUSTJOBHOSTIP=GRANITE
set IMAGE=bootdie.img
call %LDMS_CLIENT_DIR%\sdclient.exe /f /p="http://%CUSTJOBHOSTIP%/landesk/vboot/bootfile.exe"
call %LDMS_CLIENT_DIR%\sdclient.exe /f /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tlibr16.dll"
call %LDMS_CLIENT_DIR%\sdclient.exe /f /p="http://%CUSTJOBHOSTIP%/landesk/vboot/tlibr32.dll"
call %LDMS_CLIENT_DIR%\sdclient.exe /f /p="http://%CUSTJOBHOSTIP%/landesk/vboot/%IMAGE%"
call %LDMS_CLIENT_DIR%\sdclient.exe /f /p="http://%CUSTJOBHOSTIP%/landesk/vboot/lddefrag.exe"
copy /Y %LDMS_CLIENT_DIR%\sdmcache\%IMAGE% c:\
call %LDMS_CLIENT_DIR\sdmcache\lddefrag.exe c:\%IMAGE%
call %LDMS_CLIENT_DIR\sdmcache\bootfile.exe c:\%IMAGE% /keep /bootunsafe
SET ERRORLEVEL=0
Second, we modify the image. Copy ldvboot.img to bootdie.img and use WinImage to inject whatever tools you want, then call those tools from autoexec.bat. In my testing, I injected LANDesk's prtition.exe and called it to erase the partition table.
@echo offThis of course leaves the data on the disk, but protects it from casual users. On the other hand, it's very fast, and if that reboot command worked, the system would be dead before the user had really realized something was happening. Other techniques may include use of Lenovo's sdd.exe if you have access to that through the TVTs, or sending the Linux image and dd'ing some /dev/zero all over the device, or whatever floats your boat. Here's a free disk wiper, and here's some DOS encryption tools.
set iar=Y
set IOBS=A
c:\net\pworkcl.exe /M 0
c:\dos\xmsdsk 3072 r: /y /t
md r:\dos
md r:\net
copy c:\dos\*.* r:\dos
copy c:\net\*.* r:\net
copy c:\*.* r:\
set path=r:\;r:\DOS;r:\NET
set COMSPEC=r:\COMMAND.COM
r:
call prtition wipe
@echo g=ffff:0000 | debug
I'd also think about replacing the bitmap in your bootdie.img, so that the last thing it shows them isn't the nice LANDesk lady, unless you think that's funny :) Thanks to Tracy Hammond for helping test!