diff --git a/tools/dashboard.php b/tools/dashboard.php new file mode 100644 index 0000000..235e012 --- /dev/null +++ b/tools/dashboard.php @@ -0,0 +1,310 @@ + 0 ? 1 : 0; + } + + $ip = $e['ip'] ?? '?'; + $country = $e['country'] ?? '??'; + $ips[$ip] = ($ips[$ip] ?? 0) + 1; + if ($country && $country !== '??') { + $countries[$country] = ($countries[$country] ?? 0) + 1; + } + + $hour = substr($e['timestamp'] ?? '', 0, 13); + if ($hour) $hours[$hour] = ($hours[$hour] ?? 0) + 1; + + if (!empty($e['username'])) { + $usernames[$e['username']] = ($usernames[$e['username']] ?? 0) + 1; + } + if (!empty($e['password'])) { + $passwords[$e['password']] = ($passwords[$e['password']] ?? 0) + 1; + } + if (!empty($e['username']) && !empty($e['password'])) { + $creds[] = [ + 'ts' => substr($e['timestamp'] ?? '', 0, 19), + 'ip' => $ip, + 'cc' => $country, + 'user' => $e['username'], + 'pass' => $e['password'], + 'att' => $e['attempt'] ?? 0, + 'delay'=> $e['delay_applied'] ?? 0, + ]; + } + + if (!isset($ip_details[$ip])) { + $ip_details[$ip] = ['country' => $country, 'attempts' => 0, 'first' => $e['timestamp'] ?? '', 'last' => '']; + } + $ip_details[$ip]['attempts']++; + $ip_details[$ip]['last'] = $e['timestamp'] ?? ''; +} + +arsort($usernames); +arsort($passwords); +arsort($ips); +arsort($countries); +ksort($hours); + +$unique_ips = count($ips); +$top_user = $usernames ? array_key_first($usernames) : '-'; +$top_pass = $passwords ? array_key_first($passwords) : '-'; + +// Active tab +$tab = $_GET['tab'] ?? 'overview'; +?> + + + + + + +Honeypot Intel — <?php echo htmlspecialchars($site_name); ?> + + + +
+ +

Honeypot Intelligence

+

— log entries

+ +
+
Login Attempts
+
Recon Visits
+
Unique IPs
+
Countries
+
+ +'Overview','creds'=>'Credentials','passwords'=>'Passwords','usernames'=>'Usernames','ips'=>'IPs','countries'=>'Countries','timeline'=>'Timeline']; +?> + + + + +
+

Top 10 Usernames

+ + + $c): ?> + + +
UsernameAttempts
+
No login attempts yet
+
+ +
+

Top 10 Passwords

+ + + $c): ?> + + +
PasswordAttempts
+
No login attempts yet
+
+ + + +
+

All Credential Pairs (newest first)

+
+ + + + + + + + + + + + + +
TimeIPCCUsernamePassword#Delay
+s
+
No credentials captured yet
+
+
+ + + +
+

All Passwords by Frequency

+
+ + + $c): ?> + + +
PasswordCount
+
No passwords yet
+
+
+ + + +
+

All Usernames by Frequency

+
+ + + $c): ?> + + +
UsernameCount
+
No usernames yet
+
+
+ + + +
+

Attacking IPs

+
+ + + $c): +$d = $ip_details[$ip] ?? []; ?> + + + + + + + + + +
IPCountryHitsFirst SeenLast Seen
+
No IPs yet
+
+
+ + + +
+

Attacks by Country

+ + + $c): ?> + + +
CountryAttempts
+
No country data (requires Cloudflare)
+
+ + + +
+

Attack Timeline (by hour)

+
+ + + $c): ?> + + +
HourEvents
+
No timeline data yet
+
+
+ + + +

wp-honeypot dashboard ·

+ +
+ +