Skip to content

offseckit/chmod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

>_ osk chmod

Convert and explain Linux file permissions from the terminal. Octal, symbolic, ls -l, and POSIX chmod notation in both directions; setuid/setgid/sticky bit context for pentest privilege escalation.

Part of OffSecKit | Browser version | Unified CLI

Install

pip install offseckit

Usage

# Convert octal to symbolic and back
osk chmod 755
osk chmod rwxr-xr-x

# Bit-by-bit explanation including setuid/setgid/sticky context
osk chmod 4755 --explain

# Apply POSIX symbolic notation against a base mode
osk chmod 644 --apply u+x
osk chmod 755 --apply go-w
osk chmod 0 --apply u=rwx,go=rx

# Detect risky permissions only
osk chmod 777 --warnings
osk chmod 4777 --warnings

# Output JSON for scripting
osk chmod 4755 --json

# List common permission presets (755, 644, 600, 1777, 4755, ...)
osk chmod presets

# Print find(1) recipes for privesc hunting
osk chmod hunt

What it covers

  • Octal forms with or without the leading special-bit digit (e.g. 755, 0755, 4755).
  • Symbolic ls -l form including capital S/T for setuid/setgid/sticky without execute.
  • POSIX symbolic notation: u+x, go-w, a=rw, u=rwx,go=rx, +t, o=u.
  • Risk warnings for world-writable, world-writable + setuid, sticky-without-execute, and empty-owner modes.
  • Privilege-escalation hunting cheat sheet: setuid/setgid binaries, world-writable dirs, current-user-writable paths.

Related

License

MIT

About

Convert and explain Linux file permissions. Octal, symbolic, POSIX, ls -l notation with setuid/setgid/sticky context for pentesters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors