[ SEA-GHOST MINI SHELL]

Path : /proc/3/cwd/usr/local/maldetect/
FILE UPLOADER :
Current File : //proc/3/cwd/usr/local/maldetect/maldet.1

.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.38.2.
.TH LINUX-MALWARE-DETECT "19" "September 2016" "Linux Malware Detect v1.6.5" "User Commands"
.SH NAME
maldet \- Linux Malware Detect
.SH SYNOPSIS
.PP
maldet [\-h|\-\-help] [\-a|\-\-scan\-all PATH] [\-r|\-\-scan\-recent PATH DAYS] [\-f|\-\-file\-list PATH]
[\-i|\-\-include\-regex] [\-x|\-\-exclude\-regex] [\-b|\-\-background] [\-m|\-\-monitor] [\-k|\-\-kill\-monitor]
[\-c|\-\-checkout] [\-q|\-\-quarantine] [\-s|\-\-restore] [\-n|\-\-clean] [\-l|\-\-log] [\-e|\-\-report] [\-E|\-\-dump\-report]
[\-u|\-\-update\-sigs]
.SH DESCRIPTION
Linux Malware Detect is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in shared hosted environments. It uses threat data from network edge intrusion detection systems to extract malware that is actively being used in attacks and generates signatures for detection. In addition, threat data is also derived from user submissions with the LMD checkout feature and from malware community resources. The signatures that LMD uses are MD5 file hashes and HEX pattern matches, they are also easily exported to any number of detection tools such as ClamAV.
.PP
The driving force behind LMD is that there is currently limited availability of open source/restriction free tools for Linux systems that focus on malware detection and more important that get it right. Many of the AV products that perform malware detection on Linux have a very poor track record of detecting threats, especially those targeted at shared hosted environments.
.PP
The threat landscape in shared hosted environments is unique from that of the standard AV products detection suite in that they are detecting primarily OS level trojans, rootkits and traditional file-infecting viruses but missing the ever increasing variety of malware on the user account level which serves as an attack platform.
.SH FEATURES
.IP \(bu 3
MD5 file hash detection for quick threat identification
.IP \(bu 3
HEX based pattern matching for identifying threat variants
.IP \(bu 3
statistical analysis component for detection of obfuscated threats (e.g: base64)
.IP \(bu 3
integrated detection of ClamAV to use as scanner engine for improved performance
.IP \(bu 3
integrated signature update feature with \fB-u\fP|\fB--update\fP
.IP \(bu 3
integrated version update feature with \fB-d\fP|\fB--update-ver\fP
.IP \(bu 3
scan-recent option to scan only files that have been added/changed in X days
.IP \(bu 3
scan-all option for full path based scanning
.IP \(bu 3
checkout option to upload suspected malware to rfxn.com for review / hashing
.IP \(bu 3
full reporting system to view current and previous scan results
.IP \(bu 3
quarantine queue that stores threats in a safe fashion with no permissions
.IP \(bu 3
quarantine batching option to quarantine the results of a current or past scans
.IP \(bu 3
quarantine restore option to restore files to original path, owner and perms
.IP \(bu 3
quarantine suspend account option to Cpanel suspend or shell revoke users
.IP \(bu 3
cleaner rules to attempt removal of malware injected strings
.IP \(bu 3
cleaner batching option to attempt cleaning of previous scan reports
.IP \(bu 3
cleaner rules to remove base64 and \fBgzinflate\fP(base64 injected malware
.IP \(bu 3
daily cron based scanning of all changes in last 24h in user homedirs
.IP \(bu 3
daily cron script compatible with stock RH style systems, Cpanel & Ensim
.IP \(bu 3
kernel based inotify real time file scanning of created/modified/moved files
.IP \(bu 3
kernel inotify monitor that can take path data from STDIN or FILE
.IP \(bu 3
kernel inotify monitor convenience feature to monitor system users
.IP \(bu 3
kernel inotify monitor can be restricted to a configurable user html root
.IP \(bu 3
kernel inotify monitor with dynamic sysctl limits for optimal performance
.IP \(bu 3
kernel inotify alerting through daily and/or optional weekly reports
.IP \(bu 3
e-mail alert reporting after every scan execution (manual & daily)
.IP \(bu 3
path, extension and signature based ignore options
.IP \(bu 3
background scanner option for unattended scan operations
.IP \(bu 3
verbose logging & output of all actions
.SH THREAT SOURCE DATA
The defining difference with LMD is that it doesn't just detect malware based 
on signatures/hashes that someone else generated but rather it is an 
encompassing project that actively tracks in the wild threats and generates 
signatures based on those real world threats that are currently circulating.
.PP
There are four main sources for malware data that is used to generate LMD 
signatures:
.IP \(bu 3
Network Edge IPS: The network I manage hosts over 35,000 web sites and as
such receives a large amount of daily abuse, all of which is logged by our 
network edge IPS. The IPS events are processed to extract malware url's, 
decode POST payload and base64/gzip encoded abuse data and ultimately that 
malware is retrieved, reviewed, classified and then signatures generated as 
appropriate. The vast majority of LMD signatures have been derived from IPS 
extracted data.
.IP \(bu 3
Community Data: Data is aggregated from multiple community malware websites
such as clean-mx and malwaredomainlist then processed to retrieve new 
malware, review, classify and then generate signatures.
.IP \(bu 3
ClamAV: The HEX & MD5 detection signatures from ClamAV are monitored for
relevant updates that apply to the target user group of LMD and added to the 
project as appropriate. To date there has been roughly 400 signatures ported 
from ClamAV while the LMD project has contributed back to ClamAV by 
submitting over 1,100 signatures and continues to do so on an ongoing basis.
.IP \(bu 3
User Submission: LMD has a checkout feature that allows users to submit
suspected malware for review, this has grown into a very popular feature and 
generates on average about 30-50 submissions per week.
.SH SIGNATURE UPDATES
The LMD signatures are updated typically once per day or more frequently
depending on incoming threat data from the LMD checkout feature, IPS malware
extraction and other sources. The updating of signatures in LMD installations
is performed daily through the default cron.daily script with the \fB--update\fP
option, which can be run manually at any time.
.TP
.B
An RSS feed is available for tracking malware threat updates:
RSS Recent Signatures: http://www.rfxn.com/api/lmd
.TP
.B
.SH CLI USAGE
The command line options are as follows:
.HP
\fB\-b\fR, \fB\-\-background\fR
.IP
Execute operations in the background, ideal for large scans
e.g: maldet \fB\-b\fR \fB\-r\fR /home/?/public_html 7
.HP
\fB\-u\fR, \fB\-\-update\-sigs\fR
.IP
Update malware detection signatures from rfxn.com
.HP
\fB\-f\fR, \fB\-\-file\-list\fR
.IP
Scan files or paths defined in line spaced file
e.g: maldet \fB\-f\fR \fI\,/root/scan_file_list\/\fP
.HP
\fB\-r\fR, \fB\-\-scan\-recent\fR PATH DAYS
.IP
Scan files created/modified in the last X days (default: 7d, wildcard: ?)
e.g: maldet \fB\-r\fR /home/?/public_html 2
.HP
\fB\-a\fR, \fB\-\-scan\-all\fR PATH
.IP
Scan all files in path (default: \fI\,/home\/\fP, wildcard: ?)
e.g: maldet \fB\-a\fR /home/?/public_html
.HP
\fB\-i\fR, \fB\-\-include\-regex\fR REGEX
.IP
Include paths/files from file list based on supplied posix\-egrep regular
expression.
e.g: To include only paths named wp\-content and files ending in .php:
\fB\-\-include\-regex\fR ".*/wp\-content/.*|.*.php$"
.HP
\fB\-x\fR, \fB\-\-exclude\-regex\fR REGEX
.IP
Exclude paths/files from file list based on supplied posix\-egrep regular
expression.
e.g: To exclude paths containing 'wp\-content/w3tc/' and core files:
\fB\-\-exclude\-regex\fR ".*wp\-content/w3tc/.*|.*core.[0\-9]+$"
.HP
\fB\-m\fR, \fB\-\-monitor\fR USERS|PATHS|FILE|RELOAD
.IP
Run maldet with inotify kernel level file create/modify monitoring
If USERS is specified, monitor user homedirs for UID's > 500
If FILE is specified, paths will be extracted from file, line spaced
If PATHS are specified, must be comma spaced list, NO WILDCARDS!
e.g: maldet \fB\-\-monitor\fR users
e.g: maldet \fB\-\-monitor\fR \fI\,/usr/local/maldetect/monitor_paths\/\fP
e.g: maldet \fB\-\-monitor\fR \fI\,/home/mike\/\fP,/home/ashton
.HP
\fB\-k\fR, \fB\-\-kill\-monitor\fR
.IP
Terminate inotify monitoring service
.HP
\fB\-c\fR, \fB\-\-checkout\fR FILE
.IP
Upload suspected malware to rfxn.com for review & hashing into signatures
.HP
\fB\-l\fR, \fB\-\-log\fR
.IP
View maldet log file events
.HP
\fB\-e\fR, \fB\-\-report\fR SCANID email
.IP
View scan report of most recent scan or of a specific SCANID and optionally
e\-mail the report to a supplied e\-mail address
e.g: maldet \fB\-\-report\fR
e.g: maldet \fB\-\-report\fR list
e.g: maldet \fB\-\-report\fR 050910\-1534.21135
e.g: maldet \fB\-\-report\fR SCANID user@domain.com
.HP
\fB\-e\fR, \fB\-\-dump-report\fR SCANID
.IP
Similar to \-\-report but dumps the report to stdout instead.
e.g: maldet \fB\-\-dump\-report\fR
e.g: maldet \fB\-\-dump\-report\fR 050910\-1534.21135
.HP
\fB\-s\fR, \fB\-\-restore\fR FILE|SCANID
.IP
Restore file from quarantine queue to orginal path or restore all items from
a specific SCANID
e.g: maldet \fB\-\-restore\fR \fI\,/usr/local/maldetect/quarantine/config.php.23754\/\fP
e.g: maldet \fB\-\-restore\fR 050910\-1534.21135
.HP
\fB\-q\fR, \fB\-\-quarantine\fR SCANID
.IP
Quarantine all malware from report SCANID
e.g: maldet \fB\-\-quarantine\fR 050910\-1534.21135
.HP
\fB\-n\fR, \fB\-\-clean\fR SCANID
.IP
Try to clean & restore malware hits from report SCANID
e.g: maldet \fB\-\-clean\fR 050910\-1534.21135
.HP
\fB\-U\fR, \fB\-\-user\fR USER
.IP
Set execution under specified user, ideal for restoring from user quarantine or
to view user reports.
e.g: maldet \fB\-\-user\fR nobody \fB\-\-report\fR
e.g: maldet \fB\-\-user\fR nobody \fB\-\-restore\fR 050910\-1534.21135
.HP
\fB\-co\fR, \fB\-\-config\-option\fR VAR1=VALUE,VAR2=VALUE,VAR3=VALUE
.IP
Set or redefine the value of maldetect.conf config options
e.g: maldet \fB\-\-config\-option\fR email_addr=you@domain.com,quarantine_hits=1
.HP
\fB\-p\fR, \fB\-\-purge\fR
.IP
Clear logs, quarantine queue, session and temporary data.
.SH LICENSE
This program may be freely redistributed under the terms of the GNU GPL v2
.SH AUTHORS
.PP
(C) 2002\-2023, R\-fx Networks <proj@r\-fx.org>
(C) 2023, Ryan MacDonald <ryan@r\-fx.org>


SEA-GHOST - SHELL CODING BY SEA-GHOST