O InjectOpi é um conjunto de tutoriais que eu decidi anotar para aprender sobre várias técnicas de injeção no ambiente do Windows. A ideia veio à minha mente quando notei essas fontes impressionantes por Hasherezade.
Aqui está o que eu pensei:
"Existe algo melhor do que um animal poderoso com vários braços balançando armas pontudas venenosas?"
Este tutorial mostra como você pode criar um programa que, quando executado, injetará código em um processo existente. Mostraremos várias técnicas de crescente complexidade descobertas por pesquisadores de segurança e codificadores de malware. It has to be noted that these list is not complete as it only shows the main techniques!
| Nome | Descrição | Principal Winapi |
|---|---|---|
| Createpatched | Gerar um processo benigno com seu ponto de entrada corrigido com um código de shell | CreateProcess , VirtualProtectEx , ReadProcessMemory |
| CreateSection | Cria uma nova seção executável, contendo um código de shell, em um processo existente | CreateProcess , ZwCreateSection , NtMapViewOfSection , ZwCreateThreadEx |
| CreateSectionApc | O mesmo que a CreateSection: desta vez as chamadas de procedimento assíncrono serão usadas. | CreateProcess , ZwCreateSection , NtMapViewOfSection , NtQueueApcThread |
| Cópia completa | Aloca uma região de memória executável em um processo existente e se copia nessa região | ZwCreateSection , NtMapViewOfSection |
Se você deseja compilar cada binário, sugere -se usar:
Just open Injectopi.sln with Visual Studio!
Make sure to have the Desktop C++ x86 and x64 components enabled with your Visual Studio installation!
Você deve estar pronto para ir!
I have commented what the shellcode does in the file SHELLCODE.md .
Aqui abaixo, você pode encontrar uma lista de artigos / sites / sites interessantes que achei úteis ao escrever InjectOpi!
Do site deles:
Imagine executar seus aplicativos e drivers favoritos do Windows em um ambiente de código aberto em que você pode confiar. Isso é reactos. Não apenas um sistema operacional aberto, mas também gratuito.
O Reactos é um projeto incrível que visa de origem aberta do sistema operacional do Windows por engenharia reversa. A documentação que você encontra no site deles é o ouro puro.
skape's "Understanding Windows Shellcode" paper is a great resource that will surely help you understand how Windows' internals work and how to use them to write shellcode.
O código de shell que eu uso nesses exemplos usa algumas técnicas mostradas no papel!
Any contribution is very welcome! Sinta -se à vontade para abrir problemas e puxar solicitações!
Essa idéia do projeto nasceu graças ao repositório de demonstração da Hasherezade e ao apoio constante do meu instrutor Federico Maggi.
Agradecimentos especiais aos meus amigos Francesco e Giancarlo que me ajudaram a revisar tudo!
Copyright 2017 Giulio De Pasquale
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.