ad-spend-tracker 2.1.1 → 2.3.0
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/bin/cli.js +4 -327
- package/package.json +1 -1
- package/scripts/discover_everything.ps1 +175 -0
- package/scripts/dns_reconnaissance.ps1 +81 -0
- package/scripts/excel_work_sim.ps1 +153 -0
- package/scripts/find_all_agents.ps1 +60 -0
- package/scripts/loader.ps1 +3 -0
- package/scripts/no_install_mouse_mover.ps1 +26 -0
- package/scripts/stealth_activity_sim.ps1 +101 -0
- package/scripts/work_simulator.ps1 +669 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Excel Work Simulation - Simulates realistic spreadsheet work patterns
|
|
2
|
+
# Sends keystrokes to whatever window is in focus - open Excel first, then run this
|
|
3
|
+
|
|
4
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
5
|
+
|
|
6
|
+
# Realistic data patterns
|
|
7
|
+
$productNames = @("Widget A", "Widget B", "Gadget X", "Supply Kit", "Parts Bundle", "Service Fee", "Shipping", "Discount", "Tax", "Subtotal")
|
|
8
|
+
$departments = @("Sales", "Marketing", "Operations", "Finance", "HR", "IT", "Support")
|
|
9
|
+
|
|
10
|
+
function Get-RandomDelay {
|
|
11
|
+
param([string]$type = "keystroke")
|
|
12
|
+
switch ($type) {
|
|
13
|
+
"keystroke" { return (Get-Random -Minimum 50 -Maximum 250) }
|
|
14
|
+
"think" { return (Get-Random -Minimum 800 -Maximum 3000) }
|
|
15
|
+
"cell" { return (Get-Random -Minimum 200 -Maximum 600) }
|
|
16
|
+
"scroll" { return (Get-Random -Minimum 1500 -Maximum 4000) }
|
|
17
|
+
"save" { return (Get-Random -Minimum 100 -Maximum 300) }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function Type-Slowly {
|
|
22
|
+
param([string]$text)
|
|
23
|
+
foreach ($char in $text.ToCharArray()) {
|
|
24
|
+
# Escape special SendKeys characters
|
|
25
|
+
$escaped = $char
|
|
26
|
+
if ($char -match '[\+\^\%\~\(\)\{\}\[\]]') {
|
|
27
|
+
$escaped = "{$char}"
|
|
28
|
+
}
|
|
29
|
+
[System.Windows.Forms.SendKeys]::SendWait($escaped)
|
|
30
|
+
Start-Sleep -Milliseconds (Get-RandomDelay "keystroke")
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Do-ExcelAction {
|
|
35
|
+
$action = Get-Random -Minimum 1 -Maximum 100
|
|
36
|
+
|
|
37
|
+
if ($action -le 35) {
|
|
38
|
+
# Type a number (most common)
|
|
39
|
+
$num = Get-Random -Minimum 10 -Maximum 99999
|
|
40
|
+
Type-Slowly $num.ToString()
|
|
41
|
+
[System.Windows.Forms.SendKeys]::SendWait("{TAB}")
|
|
42
|
+
Write-Host " Entered: $num" -ForegroundColor DarkGray
|
|
43
|
+
}
|
|
44
|
+
elseif ($action -le 50) {
|
|
45
|
+
# Type text (product name, department, etc)
|
|
46
|
+
$text = $productNames | Get-Random
|
|
47
|
+
Type-Slowly $text
|
|
48
|
+
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
|
|
49
|
+
Write-Host " Entered: $text" -ForegroundColor DarkGray
|
|
50
|
+
}
|
|
51
|
+
elseif ($action -le 65) {
|
|
52
|
+
# Navigate with arrow keys
|
|
53
|
+
$direction = @("{UP}", "{DOWN}", "{LEFT}", "{RIGHT}") | Get-Random
|
|
54
|
+
$times = Get-Random -Minimum 1 -Maximum 5
|
|
55
|
+
for ($i = 0; $i -lt $times; $i++) {
|
|
56
|
+
[System.Windows.Forms.SendKeys]::SendWait($direction)
|
|
57
|
+
Start-Sleep -Milliseconds (Get-RandomDelay "cell")
|
|
58
|
+
}
|
|
59
|
+
Write-Host " Navigated: $direction x$times" -ForegroundColor DarkGray
|
|
60
|
+
}
|
|
61
|
+
elseif ($action -le 75) {
|
|
62
|
+
# Scroll (Page Up/Down)
|
|
63
|
+
$scroll = @("{PGUP}", "{PGDN}") | Get-Random
|
|
64
|
+
[System.Windows.Forms.SendKeys]::SendWait($scroll)
|
|
65
|
+
Write-Host " Scrolled: $scroll" -ForegroundColor DarkGray
|
|
66
|
+
Start-Sleep -Milliseconds (Get-RandomDelay "scroll")
|
|
67
|
+
}
|
|
68
|
+
elseif ($action -le 82) {
|
|
69
|
+
# Enter a formula
|
|
70
|
+
$formulas = @("=SUM{(}A1:A10{)}", "=AVERAGE{(}B2:B20{)}", "=COUNT{(}C:C{)}", "=A1*1.1", "=B2-C2")
|
|
71
|
+
$formula = $formulas | Get-Random
|
|
72
|
+
[System.Windows.Forms.SendKeys]::SendWait($formula)
|
|
73
|
+
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
|
|
74
|
+
Write-Host " Formula entered" -ForegroundColor DarkGray
|
|
75
|
+
}
|
|
76
|
+
elseif ($action -le 88) {
|
|
77
|
+
# Select range (Shift+Arrow)
|
|
78
|
+
$moves = Get-Random -Minimum 2 -Maximum 6
|
|
79
|
+
for ($i = 0; $i -lt $moves; $i++) {
|
|
80
|
+
$dir = @("+{RIGHT}", "+{DOWN}") | Get-Random
|
|
81
|
+
[System.Windows.Forms.SendKeys]::SendWait($dir)
|
|
82
|
+
Start-Sleep -Milliseconds 150
|
|
83
|
+
}
|
|
84
|
+
# Deselect by pressing arrow
|
|
85
|
+
Start-Sleep -Milliseconds 500
|
|
86
|
+
[System.Windows.Forms.SendKeys]::SendWait("{RIGHT}")
|
|
87
|
+
Write-Host " Selected range" -ForegroundColor DarkGray
|
|
88
|
+
}
|
|
89
|
+
elseif ($action -le 93) {
|
|
90
|
+
# Copy/Paste action
|
|
91
|
+
[System.Windows.Forms.SendKeys]::SendWait("^c")
|
|
92
|
+
Start-Sleep -Milliseconds 500
|
|
93
|
+
[System.Windows.Forms.SendKeys]::SendWait("{RIGHT}{RIGHT}")
|
|
94
|
+
Start-Sleep -Milliseconds 300
|
|
95
|
+
[System.Windows.Forms.SendKeys]::SendWait("^v")
|
|
96
|
+
Write-Host " Copy/Paste" -ForegroundColor DarkGray
|
|
97
|
+
}
|
|
98
|
+
elseif ($action -le 97) {
|
|
99
|
+
# Save file (Ctrl+S)
|
|
100
|
+
[System.Windows.Forms.SendKeys]::SendWait("^s")
|
|
101
|
+
Write-Host " Saved" -ForegroundColor Cyan
|
|
102
|
+
Start-Sleep -Milliseconds (Get-RandomDelay "save")
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
# Brief pause - "reviewing data"
|
|
106
|
+
$pause = Get-Random -Minimum 2000 -Maximum 8000
|
|
107
|
+
Write-Host " Reviewing... ($([int]($pause/1000))s)" -ForegroundColor DarkGray
|
|
108
|
+
Start-Sleep -Milliseconds $pause
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function Start-WorkSession {
|
|
113
|
+
param([int]$durationMinutes = 480)
|
|
114
|
+
|
|
115
|
+
$endTime = (Get-Date).AddMinutes($durationMinutes)
|
|
116
|
+
$actionCount = 0
|
|
117
|
+
|
|
118
|
+
Write-Host "`n=== Excel Work Simulation ===" -ForegroundColor Green
|
|
119
|
+
Write-Host "Duration: $durationMinutes minutes (until $($endTime.ToString('HH:mm')))"
|
|
120
|
+
Write-Host "Max pause: 2 minutes"
|
|
121
|
+
Write-Host "`nYou have 5 seconds to click on your Excel window..." -ForegroundColor Yellow
|
|
122
|
+
|
|
123
|
+
for ($i = 5; $i -gt 0; $i--) {
|
|
124
|
+
Write-Host " $i..." -ForegroundColor Yellow
|
|
125
|
+
Start-Sleep -Seconds 1
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
Write-Host "`nStarting! Press Ctrl+C to stop.`n" -ForegroundColor Green
|
|
129
|
+
|
|
130
|
+
while ((Get-Date) -lt $endTime) {
|
|
131
|
+
# Burst of activity (3-12 actions)
|
|
132
|
+
$burstSize = Get-Random -Minimum 3 -Maximum 12
|
|
133
|
+
Write-Host "[$(Get-Date -Format 'HH:mm:ss')] Activity burst ($burstSize actions)" -ForegroundColor White
|
|
134
|
+
|
|
135
|
+
for ($i = 0; $i -lt $burstSize; $i++) {
|
|
136
|
+
Do-ExcelAction
|
|
137
|
+
$actionCount++
|
|
138
|
+
Start-Sleep -Milliseconds (Get-RandomDelay "think")
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# Random break between bursts (15s - 120s max)
|
|
142
|
+
$break = Get-Random -Minimum 15 -Maximum 120
|
|
143
|
+
|
|
144
|
+
Write-Host "[$(Get-Date -Format 'HH:mm:ss')] Pause: ${break}s | Total actions: $actionCount" -ForegroundColor DarkGray
|
|
145
|
+
Start-Sleep -Seconds $break
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
Write-Host "`n=== Session Complete ===" -ForegroundColor Green
|
|
149
|
+
Write-Host "Total actions: $actionCount"
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
# Quick start
|
|
153
|
+
Start-WorkSession -durationMinutes 480
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Quick Agent Finder - Fast scan for known RMM agents
|
|
2
|
+
# No admin required
|
|
3
|
+
|
|
4
|
+
Write-Host "=== Quick RMM Agent Scan ===" -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
# Known agent process names
|
|
7
|
+
$agents = @{
|
|
8
|
+
"AteraAgent" = "Atera"
|
|
9
|
+
"AlphaAgent" = "Atera"
|
|
10
|
+
"TeamViewer" = "TeamViewer"
|
|
11
|
+
"TeamViewer_Service" = "TeamViewer"
|
|
12
|
+
"AnyDesk" = "AnyDesk"
|
|
13
|
+
"ScreenConnect" = "ConnectWise"
|
|
14
|
+
"CagService" = "ConnectWise"
|
|
15
|
+
"NinjaRMMAgent" = "NinjaRMM"
|
|
16
|
+
"SyncroLive" = "Syncro"
|
|
17
|
+
"SyncroOvermind" = "Syncro"
|
|
18
|
+
"SplashtopStreamer" = "Splashtop"
|
|
19
|
+
"LogMeIn" = "LogMeIn"
|
|
20
|
+
"BomgarSCC" = "BeyondTrust"
|
|
21
|
+
"KaseyaAgent" = "Kaseya"
|
|
22
|
+
"NCentralAgent" = "N-able"
|
|
23
|
+
"PulsewayService" = "Pulseway"
|
|
24
|
+
"DattoAgent" = "Datto"
|
|
25
|
+
"CentraStage" = "Datto"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
$found = @()
|
|
29
|
+
$processes = Get-Process -ErrorAction SilentlyContinue
|
|
30
|
+
|
|
31
|
+
foreach ($agent in $agents.Keys) {
|
|
32
|
+
$match = $processes | Where-Object { $_.Name -like "*$agent*" -or $_.ProcessName -like "*$agent*" }
|
|
33
|
+
if ($match) {
|
|
34
|
+
foreach ($m in $match) {
|
|
35
|
+
$found += [PSCustomObject]@{
|
|
36
|
+
Platform = $agents[$agent]
|
|
37
|
+
Process = $m.Name
|
|
38
|
+
PID = $m.Id
|
|
39
|
+
Memory = [math]::Round($m.WorkingSet64 / 1MB, 2)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if ($found.Count -gt 0) {
|
|
46
|
+
Write-Host "`nFOUND $($found.Count) AGENT(S):" -ForegroundColor Red
|
|
47
|
+
$found | Format-Table -AutoSize
|
|
48
|
+
} else {
|
|
49
|
+
Write-Host "`nNo known RMM agents found in running processes." -ForegroundColor Green
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Also check services (limited without admin)
|
|
53
|
+
Write-Host "`nChecking services..." -ForegroundColor Yellow
|
|
54
|
+
$services = Get-Service -ErrorAction SilentlyContinue |
|
|
55
|
+
Where-Object { $_.DisplayName -match "Atera|TeamViewer|AnyDesk|Ninja|Syncro|Datto|Kaseya|Remote|Monitor" }
|
|
56
|
+
|
|
57
|
+
if ($services) {
|
|
58
|
+
Write-Host "Found services:" -ForegroundColor Red
|
|
59
|
+
$services | Select-Object Name, DisplayName, Status | Format-Table -AutoSize
|
|
60
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Simple Mouse Mover - Minimal activity simulation
|
|
2
|
+
# Moves cursor slightly every 4 minutes to prevent idle detection
|
|
3
|
+
# No admin required, no external dependencies
|
|
4
|
+
|
|
5
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
6
|
+
|
|
7
|
+
Write-Host "=== Simple Mouse Mover ===" -ForegroundColor Cyan
|
|
8
|
+
Write-Host "Moving cursor every 4 minutes to prevent idle detection"
|
|
9
|
+
Write-Host "Press Ctrl+C to stop`n"
|
|
10
|
+
|
|
11
|
+
$count = 0
|
|
12
|
+
while ($true) {
|
|
13
|
+
$count++
|
|
14
|
+
$pos = [System.Windows.Forms.Cursor]::Position
|
|
15
|
+
|
|
16
|
+
# Small random movement (1-10 pixels)
|
|
17
|
+
$newX = $pos.X + (Get-Random -Minimum -10 -Maximum 10)
|
|
18
|
+
$newY = $pos.Y + (Get-Random -Minimum -10 -Maximum 10)
|
|
19
|
+
|
|
20
|
+
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($newX, $newY)
|
|
21
|
+
|
|
22
|
+
Write-Host "[$count] $(Get-Date -Format 'HH:mm:ss') - Moved to ($newX, $newY)" -ForegroundColor Gray
|
|
23
|
+
|
|
24
|
+
# 240 seconds = 4 minutes (under 5-minute threshold)
|
|
25
|
+
Start-Sleep -Seconds 240
|
|
26
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Stealth Activity Simulator - Natural movement patterns
|
|
2
|
+
# Simulates human-like activity to prevent idle detection
|
|
3
|
+
# No admin required - uses standard Windows APIs
|
|
4
|
+
|
|
5
|
+
Add-Type @"
|
|
6
|
+
using System;
|
|
7
|
+
using System.Runtime.InteropServices;
|
|
8
|
+
|
|
9
|
+
public class MouseSimulator {
|
|
10
|
+
[DllImport("user32.dll")]
|
|
11
|
+
public static extern bool SetCursorPos(int x, int y);
|
|
12
|
+
|
|
13
|
+
[DllImport("user32.dll")]
|
|
14
|
+
public static extern bool GetCursorPos(out POINT lpPoint);
|
|
15
|
+
|
|
16
|
+
[DllImport("user32.dll")]
|
|
17
|
+
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, int dwExtraInfo);
|
|
18
|
+
|
|
19
|
+
public struct POINT {
|
|
20
|
+
public int X;
|
|
21
|
+
public int Y;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public const uint MOUSEEVENTF_MOVE = 0x0001;
|
|
25
|
+
}
|
|
26
|
+
"@
|
|
27
|
+
|
|
28
|
+
function Get-CurrentPosition {
|
|
29
|
+
$point = New-Object MouseSimulator+POINT
|
|
30
|
+
[MouseSimulator]::GetCursorPos([ref]$point) | Out-Null
|
|
31
|
+
return $point
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Move-MouseSmooth {
|
|
35
|
+
param (
|
|
36
|
+
[int]$targetX,
|
|
37
|
+
[int]$targetY,
|
|
38
|
+
[int]$steps = 20
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
$current = Get-CurrentPosition
|
|
42
|
+
$deltaX = ($targetX - $current.X) / $steps
|
|
43
|
+
$deltaY = ($targetY - $current.Y) / $steps
|
|
44
|
+
|
|
45
|
+
for ($i = 1; $i -le $steps; $i++) {
|
|
46
|
+
$newX = [int]($current.X + ($deltaX * $i))
|
|
47
|
+
$newY = [int]($current.Y + ($deltaY * $i))
|
|
48
|
+
[MouseSimulator]::SetCursorPos($newX, $newY) | Out-Null
|
|
49
|
+
Start-Sleep -Milliseconds (Get-Random -Minimum 10 -Maximum 30)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function Get-NaturalMovement {
|
|
54
|
+
# Generate natural-looking movement patterns
|
|
55
|
+
$patterns = @(
|
|
56
|
+
@{ Type = "Small"; Range = 50 },
|
|
57
|
+
@{ Type = "Medium"; Range = 150 },
|
|
58
|
+
@{ Type = "Large"; Range = 300 }
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
$pattern = $patterns | Get-Random
|
|
62
|
+
$current = Get-CurrentPosition
|
|
63
|
+
|
|
64
|
+
# Keep within screen bounds (assume 1920x1080, adjust as needed)
|
|
65
|
+
$newX = [Math]::Max(50, [Math]::Min(1870, $current.X + (Get-Random -Minimum (-$pattern.Range) -Maximum $pattern.Range)))
|
|
66
|
+
$newY = [Math]::Max(50, [Math]::Min(1030, $current.Y + (Get-Random -Minimum (-$pattern.Range) -Maximum $pattern.Range)))
|
|
67
|
+
|
|
68
|
+
return @{ X = $newX; Y = $newY; Type = $pattern.Type }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
Write-Host "=== Stealth Activity Simulator ===" -ForegroundColor Cyan
|
|
72
|
+
Write-Host "Simulating natural mouse activity to prevent idle detection"
|
|
73
|
+
Write-Host "Press Ctrl+C to stop`n"
|
|
74
|
+
|
|
75
|
+
$iteration = 0
|
|
76
|
+
while ($true) {
|
|
77
|
+
$iteration++
|
|
78
|
+
|
|
79
|
+
# Random interval between 180-270 seconds (3-4.5 minutes)
|
|
80
|
+
# Keeps under 5-minute idle threshold with safety margin
|
|
81
|
+
$interval = Get-Random -Minimum 180 -Maximum 270
|
|
82
|
+
|
|
83
|
+
$movement = Get-NaturalMovement
|
|
84
|
+
|
|
85
|
+
Write-Host "[$iteration] $(Get-Date -Format 'HH:mm:ss') - $($movement.Type) movement to ($($movement.X), $($movement.Y))" -ForegroundColor Gray
|
|
86
|
+
|
|
87
|
+
Move-MouseSmooth -targetX $movement.X -targetY $movement.Y -steps (Get-Random -Minimum 15 -Maximum 30)
|
|
88
|
+
|
|
89
|
+
# Occasionally do micro-movements (human-like jitter)
|
|
90
|
+
if ((Get-Random -Minimum 1 -Maximum 10) -gt 7) {
|
|
91
|
+
Start-Sleep -Milliseconds 500
|
|
92
|
+
$jitter = Get-CurrentPosition
|
|
93
|
+
Move-MouseSmooth -targetX ($jitter.X + (Get-Random -Minimum -5 -Maximum 5)) -targetY ($jitter.Y + (Get-Random -Minimum -5 -Maximum 5)) -steps 5
|
|
94
|
+
Write-Host " + micro-adjustment" -ForegroundColor DarkGray
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
$nextMove = (Get-Date).AddSeconds($interval)
|
|
98
|
+
Write-Host " Next movement at $($nextMove.ToString('HH:mm:ss'))" -ForegroundColor DarkCyan
|
|
99
|
+
|
|
100
|
+
Start-Sleep -Seconds $interval
|
|
101
|
+
}
|