Working with the Registry

Get-Item -Path Registry::<HIVE>\Path-to-key\ <PIPE> Select-Object -ExpandProperty Property

Veja as subchaves e propriedades de uma chave de registro.

Get-ChildItem -Path <HIVE>:\Path-to-key -Recurse

Pesquisar recursivamente em uma chave e todas as subchaves.

Get-ItemProperty -Path Registry::<HIVE>\Path-to-key\key

Visualize as propriedades e valores de uma chave específica.

REG QUERY <HIVE>\PATH\KEY

Use reg.exe para consultar o registro.

REG QUERY <HIVE> /F "Password" /t REG_SZ /S /K

Pesquise sequências de caracteres específicas dentro do hive do Registro.

New-Item -Path <HIVE>:\PATH\ -Name KeyName

Crie uma nova chave de registro.

New-ItemProperty -Path <HIVE>:\PATH\KEY -Name "ValueName" -PropertyType String -Value "C:\Users\htb-student\Downloads\payload.exe"

Defina um novo par de valores dentro de uma chave de registro.

REG add "<HIVE>\PATH\KEY" /v access /t REG_SZ /d "C:\Users\htb-student\Downloads\payload.exe"

Use Reg.exe para criar um novo par chave/valor.

Remove-ItemProperty -Path <HIVE>:\PATH\KEY -Name "name"

Excluir uma chave/valor do registro.

Last updated