alphasec
Windows protip 0089
in 𝕏

Plik jako ukryty w cmd.exe

tty1 · windows
> attrib +h malware.pdf.js
#Windows#cmd#HideAndSeek#RedTeam

Podobnie jak w protipie 0088 ukrywamy wskazany plik lub katalog, tym razem bez PowerShella. By dany plik/katalog od-ukryć, należy wykorzystać +s:

attrib +s malwarej.pdf.js

Żeby oznaczyć plik lub katalog jako systemowy, użyjemy +s.

Co jeszcze może attrib.exe?

KradnącCytując ze strony Microsoftu:

ParameterDescription{+\|-}rSets ( +) or clears ( -) the Read-only file attribute.{+\|-}aSets ( +) or clears ( -) the Archive file attribute. This attribute set marks files that have changed since the last time they were backed up. The xcopy command uses archive attributes.{+\|-}sSets ( +) or clears ( -) the System file attribute. If a file uses this attribute set, you must clear the attribute before you can change any other attributes for the file.{+\|-}hSets ( +) or clears ( -) the Hidden file attribute. If a file uses this attribute set, you must clear the attribute before you can change any other attributes for the file.{+\|-}oSets ( +) or clears ( -) the Offline file attribute.{+\|-}iSets ( +) or clears ( -) the Not Content Indexed file attribute.{+\|-}xSets ( +) or clears ( -) the Scrub file attribute.{+\|-}pSets ( +) or clears ( -) the Pinned file attribute.{+\|-}uSets ( +) or clears ( -) the Unpinned file attribute.{+\|-}bSets ( +) or clears ( -) the SMR Blob file attribute.[<drive>:][<path>][<filename>]Specifies the location and name of the directory, file, or group of files that you want to view or change attributes.

You can use the ? and * wildcard characters in the filename parameter to display or change the attributes for a group of files./sApplies attrib and any command-line options to matching files in the current directory and all of its subdirectories./dApplies attrib and any command-line options to directories./lApplies attrib and any command-line options to the Symbolic Link, rather than the target of the Symbolic Link./?Displays help at the command prompt.

Przydatne linki

learn.microsoft.com/en-us/windows-server/administration/windows-commands/attrib dokumentacja polecenia attrib web ↗ # aptm.in/protip/0088 ukrywanie plików i katalogów PowerShellem protip ↗
← poprzedni protip 0088 ••• Wszystkie protipy następny → protip 008a
// subskrybuj

Nowe protipy prosto na maila.

Mięsiste jednolinijkowce i triki z prawdziwych zleceń. Zero spamu, zero teorii. Wypisujesz się jednym kliknięciem.

wersja newslettera: