渗出能力——Windows Token九种权限的操作
操作思绪2
0x05 SeTcbPrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L418 SeTcbPrivilege 等同于得到了体系的最高权限 操作思绪 · 挪用LsaLogonUser得到Token
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeTcbPrivilege.cpp 代码实现了开启当前历程的SeTcbPrivilege权限,登任命户test1,将其添加至Local System account组,得到System权限,建设注册表项HKEY_LOCAL_MACHINESOFTWAREtesttcb 0x06 SeBackupPrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L495 SeBackupPrivilege 用来实现备份操纵,对当前体系恣意文件具有读权限 操作思绪 · 读取注册表HKEY_LOCAL_MACHINESAM、HKEY_LOCAL_MACHINESECURITY和HKEY_LOCAL_MACHINESYSTEM · 导出当前体系的全部用户hash mimikatz的呼吁如下:
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeBackupPrivilege.cpp 代码实现了开启当前历程的SeBackupPrivilege权限,读取注册表,将其生涯成文件C:testSAM、C:testSECURITY和C:testSYSTEM 0x07 SeRestorePrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L528 SeRestorePrivilege 用来实现规复操纵,对当前体系恣意文件具有写权限 操作思绪1
操作思绪2
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeRestorePrivilege.cpp 代码实现了开启当前历程的SeRestorePrivilege权限,建设注册表项HKEY_LOCAL_MACHINESOFTWAREtestrestore 0x08 SeCreateTokenPrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L577 SeCreateTokenPrivilege 用来建设Primary Token 操作思绪 · 通过WinAPI ZwCreateToken建设Primary Token
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeCreateTokenPrivilege.cpp 代码实现了开启当前历程的SeCreateTokenPrivilege权限,建设Primary Token,将其添加至local administrator组,开启SeDebugPrivilege和SeTcbPrivilege权限 0x09 SeLoadDriverPrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L626 SeLoadDriverPrivilege 用来加载驱动文件 操作思绪
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeLoadDriverPrivilege.cpp 代码实现了开启当前历程的SeLoadDriverPrivilege权限,读取注册表项hkcuSystemCurrentControlSetCAPCOM,加载驱动文件Capcom.sys 0x0A SeTakeOwnershipPrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L688 SeTakeOwnershipPrivilege 同SeRestorePrivilege相同,对当前体系恣意文件具有写权限 操作思绪1
操作思绪2
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeTakeOwnershipPrivilege.cpp 代码实现了开启当前历程的SeTakeOwnershipPrivilege权限,修改注册表项hklmSOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options的权限,平凡用户权限对其具有完备操纵权限 后续的写操纵: reg add "hklmSOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options" /v takeownership /t REG_SZ /d "C:WindowsSystem32calc.exe" 0x0B SeDebugPrivilege权限的操作思绪 参考资料: https://github.com/hatRiot/token-priv/blob/master/abusing_token_eop_1.0.txt#L736 SeDebugPrivilege 用来调试指定历程,包罗读写内存,常用作实现dll注入 操作思绪
可供参考的测试代码: https://github.com/3gstudent/Homework-of-C-Language/blob/master/EnableSeDebugPrivilege.cpp 代码实现了开启当前历程的SeDebugPrivilege权限,向指定历程注入dll 0x0C 小结 本文总结了平凡用户(可能LocalService用户)Token中九种权限的操作要领,说明操作思绪,完美实当代码。 (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |