-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c4f2df
commit d5a3258
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
set(PROJECT_NAME dump_sam) | ||
|
||
project(${PROJECT_NAME} C) | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeListsFuncs.txt) | ||
|
||
add_definitions( | ||
-D_USRDLL | ||
) | ||
|
||
include_directories(../../source/dump_sam) | ||
include_directories(../../source/ReflectiveDLLInjection/common) | ||
include_directories(../../source/ReflectiveDLLInjection/dll/src) | ||
|
||
set(SRC_DIR ../../source/dump_sam) | ||
file(GLOB SRC_FILES | ||
${SRC_DIR}/*.c | ||
${SRC_DIR}/dump_sam.def | ||
) | ||
add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}.${TARGET_ARCH}) | ||
if(MSVC) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DEF:\"${MOD_DEF_DIR}/extension.def\"") | ||
set_source_files_properties(${MOD_DEF_DIR}/extension.def PROPERTIES HEADER_FILE_ONLY TRUE) | ||
endif() | ||
|
||
set(LINK_LIBS psapi rpcrt4) | ||
target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) | ||
if(MSVC) | ||
target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") | ||
endif() | ||
|
||
# Post processing (required for all Meterpreter DLLs) | ||
editbin(${PROJECT_NAME} ${BIN_SUBSYSTEM}) | ||
copyoutput(${PROJECT_NAME} ${BIN_OUTPUT_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters