Skip to main content

Flag

Enum Flag 

Source
pub enum Flag {
Show 18 variants TemporaryDirectory, DownloadToShell, Base64Decoding, ReverseShell, AtReboot, ForcedCommand, Preload, SudoWithoutPassword, PamExec, PamAcceptsAnyPassword, PamModuleElsewhere, RootPasswordLogin, EmptyPasswords, KeysElsewhere, ModprobeCommand, UidZero, NoPasswordNeeded, SystemAccountShell,
}
Expand description

A suspicious trait.

Variants§

§

TemporaryDirectory

The command runs something from, or works in, /tmp, /var/tmp or /dev/shm: anyone can write there, and /dev/shm leaves nothing on disk.

§

DownloadToShell

curl or wget output fed to a shell (curl … | sh, bash -c "$(wget …)"): code fetched and run, never kept.

§

Base64Decoding

Base64 decoding (base64 -d, openssl base64 -d, b64decode): a payload hidden from a casual read.

§

ReverseShell

nc, ncat, netcat, socat, or bash’s /dev/tcp/ and /dev/udp/: the usual makings of a reverse shell.

§

AtReboot

A cron job run at every boot (@reboot).

§

ForcedCommand

A key that may only run a forced command (command="…"): sometimes a restricted backup key, sometimes a backdoor run at every login.

§

Preload

A library in ld.so.preload, loaded into every program: distributions ship none, rootkits use it to hide.

§

SudoWithoutPassword

sudo without a password for every command (NOPASSWD: ALL), or without authentication at all (Defaults !authenticate).

§

PamExec

A PAM rule running a program (pam_exec.so): at every login, with the password if expose_authtok is set.

§

PamAcceptsAnyPassword

auth sufficient pam_permit.so: any password accepted.

§

PamModuleElsewhere

A PAM module given by a path outside the system’s module directories (/lib/…/security, /usr/lib/…/security).

§

RootPasswordLogin

PermitRootLogin yes: root may log in over SSH with a password.

§

EmptyPasswords

PermitEmptyPasswords yes: accounts without a password may log in over SSH.

§

KeysElsewhere

Keys sshd accepts read from somewhere else than the homes’ .ssh/authorized_keys (AuthorizedKeysFile), or from a program (AuthorizedKeysCommand).

§

ModprobeCommand

modprobe runs a command instead of loading or unloading a module (install, remove), other than /bin/true or /bin/false, the usual way to block one.

§

UidZero

An account with id 0 other than root: root’s power under another name.

§

NoPasswordNeeded

An account without a password (an empty field in etc/passwd or etc/shadow): it logs in with none where PAM allows it.

§

SystemAccountShell

A system account (id 1 to 999) whose shell lets it log in: a service account turned into a way in (www-data given /bin/bash). Some ship that way (postgres on Debian).

Implementations§

Source§

impl Flag

Source

pub const fn label(self) -> &'static str

A short label.

Trait Implementations§

Source§

impl Clone for Flag

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Flag

Source§

impl Debug for Flag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Flag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Flag

Source§

impl Hash for Flag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Flag

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Flag

Auto Trait Implementations§

§

impl Freeze for Flag

§

impl RefUnwindSafe for Flag

§

impl Send for Flag

§

impl Sync for Flag

§

impl Unpin for Flag

§

impl UnsafeUnpin for Flag

§

impl UnwindSafe for Flag

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.