diff --git a/Doxyfile b/Doxyfile index a00888f..ae7a141 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.9.1 +# Doxyfile 1.9.3 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -44,14 +44,14 @@ PROJECT_NUMBER = v3.0 # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "Jit linker, mapper, obfuscator, and mutator" +PROJECT_BRIEF = "Jit linker, symbol mapper, and obfuscator" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = doxygen/icon.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -93,14 +93,6 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. @@ -258,16 +250,16 @@ TAB_SIZE = 4 # the documentation. An alias has the form: # name=value # For example adding -# "sideeffect=@par Side Effects:\n" +# "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) ALIASES = @@ -277,7 +269,7 @@ ALIASES = # members will be omitted, etc. # The default value is: NO. -OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored @@ -312,8 +304,8 @@ OPTIMIZE_OUTPUT_SLICE = NO # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files @@ -466,7 +458,7 @@ LOOKUP_CACHE_SIZE = 0 # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, -# which efficively disables parallel processing. Please report any issues you +# which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. @@ -610,6 +602,12 @@ HIDE_SCOPE_NAMES = NO HIDE_COMPOUND_REFERENCE= NO +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -627,7 +625,7 @@ SHOW_GROUPED_MEMB_INC = NO # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. -FORCE_LOCAL_INCLUDES = NO +FORCE_LOCAL_INCLUDES = YES # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. @@ -767,7 +765,8 @@ FILE_VERSION_FILTER = # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE @@ -813,18 +812,26 @@ WARNINGS = YES WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES +# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete +# function parameter documentation. If set to NO, doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# value. If set to NO, doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC # The default value is: NO. WARN_NO_PARAMDOC = NO @@ -850,7 +857,10 @@ WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard -# error (stderr). +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). WARN_LOGFILE = @@ -892,10 +902,10 @@ INPUT_ENCODING = UTF-8 # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, -# *.ucf, *.qsf and *.ice. +# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, +# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C +# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ *.cc \ @@ -978,7 +988,7 @@ EXCLUDE_PATTERNS = # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test +# ANamespace::AClass, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* @@ -1091,19 +1101,19 @@ INLINE_SOURCES = YES # Fortran comments will always remain visible. # The default value is: YES. -STRIP_CODE_COMMENTS = YES +STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. -REFERENCED_BY_RELATION = NO +REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. -REFERENCES_RELATION = NO +REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and @@ -1121,7 +1131,7 @@ REFERENCES_LINK_SOURCE = YES # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. -SOURCE_TOOLTIPS = YES +SOURCE_TOOLTIPS = NO # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in @@ -1143,7 +1153,7 @@ SOURCE_TOOLTIPS = YES # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. -USE_HTAGS = YES +USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is @@ -1164,9 +1174,11 @@ VERBATIM_HEADERS = YES CLANG_ASSISTED_PARSING = NO -# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to -# YES then doxygen will add the directory of each input to the include path. +# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS +# tag is set to YES then doxygen will add the directory of each input to the +# include path. # The default value is: YES. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_ADD_INC_PATHS = YES @@ -1301,7 +1313,7 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see +# this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. @@ -1311,7 +1323,7 @@ HTML_EXTRA_FILES = HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A +# in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1393,6 +1405,13 @@ GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. @@ -1418,8 +1437,12 @@ DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: -# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline the HTML help workshop was already many years +# in maintenance mode). You can download the HTML help workshop from the web +# archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML @@ -1578,16 +1601,28 @@ DISABLE_INDEX = NO # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # @@ -1612,6 +1647,13 @@ TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO +# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for @@ -1660,11 +1702,29 @@ FORMULA_MACROFILE = USE_MATHJAX = NO +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + # When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1677,15 +1737,21 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = @@ -1865,29 +1931,31 @@ PAPER_TYPE = a4 EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the -# generated LaTeX document. The header should contain everything until the first -# chapter. If it is left blank doxygen will generate a standard header. See -# section "Doxygen usage" for information on how to let doxygen write the -# default header to a separate file. +# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for +# the generated LaTeX document. The header should contain everything until the +# first chapter. If it is left blank doxygen will generate a standard header. It +# is highly recommended to start with a default header using +# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty +# and then modify the file new_header.tex. See also section "Doxygen usage" for +# information on how to generate the default header that doxygen normally uses. # -# Note: Only use a user-defined header if you know what you are doing! The -# following commands have a special meaning inside the header: $title, -# $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empty -# string, for the replacement values of the other commands the user is referred -# to HTML_HEADER. +# Note: Only use a user-defined header if you know what you are doing! +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. The following +# commands have a special meaning inside the header (and footer): For a +# description of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the -# generated LaTeX document. The footer should contain everything after the last -# chapter. If it is left blank doxygen will generate a standard footer. See +# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for +# the generated LaTeX document. The footer should contain everything after the +# last chapter. If it is left blank doxygen will generate a standard footer. See # LATEX_HEADER for more information on how to generate a default footer and what -# special commands can be used inside the footer. -# -# Note: Only use a user-defined footer if you know what you are doing! +# special commands can be used inside the footer. See also section "Doxygen +# usage" for information on how to generate the default footer that doxygen +# normally uses. Note: Only use a user-defined footer if you know what you are +# doing! # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_FOOTER = @@ -1932,8 +2000,7 @@ USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode # command to the generated LaTeX files. This will instruct LaTeX to keep running -# if errors occur, instead of asking the user for help. This option is also used -# when generating formulas in HTML. +# if errors occur, instead of asking the user for help. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1946,16 +2013,6 @@ LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO -# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source -# code with syntax highlighting in the LaTeX output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_LATEX is set to YES. - -LATEX_SOURCE_CODE = NO - # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See # https://en.wikipedia.org/wiki/BibTeX and \cite for more info. @@ -2036,16 +2093,6 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = -# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code -# with syntax highlighting in the RTF output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_RTF is set to YES. - -RTF_SOURCE_CODE = NO - #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- @@ -2142,15 +2189,6 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the -# program listings (including syntax highlighting and cross-referencing -# information) to the DOCBOOK output. Note that enabling this will significantly -# increase the size of the DOCBOOK output. -# The default value is: NO. -# This tag requires that the tag GENERATE_DOCBOOK is set to YES. - -DOCBOOK_PROGRAMLISTING = NO - #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- @@ -2333,15 +2371,6 @@ EXTERNAL_PAGES = YES # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram -# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to -# NO turns the diagrams off. Note that this option also works with HAVE_DOT -# disabled, but it is recommended to install and use dot, since it yields more -# powerful graphs. -# The default value is: YES. - -CLASS_DIAGRAMS = YES - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. @@ -2398,11 +2427,14 @@ DOT_FONTSIZE = 10 DOT_FONTPATH = -# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for -# each documented class showing the direct and indirect inheritance relations. -# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a +# graph for each documented class showing the direct and indirect inheritance +# relations. In case HAVE_DOT is set as well dot will be used to draw the graph, +# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set +# to TEXT the direct and indirect inheritance relations will be shown as texts / +# links. +# Possible values are: NO, YES, TEXT and GRAPH. # The default value is: YES. -# This tag requires that the tag HAVE_DOT is set to YES. CLASS_GRAPH = YES @@ -2531,6 +2563,13 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES +# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels +# of child directories generated in directory dependency graphs by dot. +# Minimum value: 1, maximum value: 25, default value: 1. +# This tag requires that the tag DIRECTORY_GRAPH is set to YES. + +DIR_GRAPH_MAX_DEPTH = 1 + # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: @@ -2584,10 +2623,10 @@ MSCFILE_DIRS = DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the -# path where java can find the plantuml.jar file. If left blank, it is assumed -# PlantUML is not used or called during a preprocessing step. Doxygen will -# generate a warning when it encounters a \startuml command in this case and -# will not generate output for the diagram. +# path where java can find the plantuml.jar file or to the filename of jar file +# to be used. If left blank, it is assumed PlantUML is not used or called during +# a preprocessing step. Doxygen will generate a warning when it encounters a +# \startuml command in this case and will not generate output for the diagram. PLANTUML_JAR_PATH = @@ -2649,6 +2688,8 @@ DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page # explaining the meaning of the various boxes and arrows in the dot generated # graphs. +# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal +# graphical representation for inheritance and collaboration diagrams is used. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2657,8 +2698,8 @@ GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate # files that are used to generate the various graphs. # -# Note: This setting is not only used for dot files but also for msc and -# plantuml temporary files. +# Note: This setting is not only used for dot files but also for msc temporary +# files. # The default value is: YES. DOT_CLEANUP = YES diff --git a/README.md b/README.md index 0e8ea0b..13cf6d3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Theodosius - Jit linker, Mapper, Mutator, and Obfuscator Theodosius (Theo for short) is a jit linker created for obfuscation. The project is extremely modular in design and supports both kernel and usermode projects. +Theo works with static libraries rather than completely compiled binaries. This allows it to easily position, obfuscate, and scatter symbols anywhere as the project takes the place of the linker. ### Table Of Contents diff --git a/doxygen/html/annotated.html b/doxygen/html/annotated.html index 62e5f0b..1153a6f 100644 --- a/doxygen/html/annotated.html +++ b/doxygen/html/annotated.html @@ -2,10 +2,10 @@
- - + + -
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
▼Ntheo | The outer most encompassing namespace of this project |
▼Ndecomp | the namespace that contains all of the decomposition related code |
Cdecomp_t | the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files |
Croutine_t | the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols |
▼Ntheo | The outer most encompassing namespace of this project. |
▼Ndecomp | the namespace that contains all of the decomposition related code. |
Cdecomp_t | the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. |
Croutine_t | the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols. |
Csymbol_t | symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down) |
▼Nobf | this is the main namespace for obfuscation related things |
▼Ntransform | this namespace encompasses the code for transforming relocations |
▼Nobf | this is the main namespace for obfuscation related things. |
▼Ntransform | this namespace encompasses the code for transforming relocations. |
Cadd_op_t | |
Coperation_t | operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t) |
Coperation_t | operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t). |
Crol_op_t | |
Cror_op_t | |
Csub_op_t | |
Cxor_op_t | |
Cengine_t | singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them |
Cpass_t | the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there |
Cengine_t | singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. |
Chello_world_pass_t | hello world pass example of how to inherit pass_t. |
Cjcc_rewrite_pass_t | jcc rewrite pass which rewrites rip relative jcc's so that they are position independent |
Cnext_inst_pass_t | This pass is used to generate transformations and jmp code to change RIP to the next instruction |
Creloc_transform_pass_t | this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol |
Chello_world_pass_t | hello world pass example of how to inherit pass_t |
▼Nrecomp | this namespace encompasses all recomposition related code |
Cpass_t | the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there |
Creloc_transform_pass_t | this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol |
▼Nrecomp | this namespace encompasses all recomposition related code. |
Crecomp_t | the main class responsible for recomposition |
Creloc_t | meta data about a relocation for a symbol |
Csymbol_table_t | this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode |
Csymbol_table_t | this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode. |
Ctheo_t | the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::pass_t, including all inherited members.
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
run(decomp::symbol_t *sym)=0 | theo::obf::pass_t | pure virtual |
run(decomp::symbol_t *sym)=0 | theo::obf::pass_t | pure virtual |
sym_type() | theo::obf::pass_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <algorithm>
#include <map>
#include <optional>
#include <vector>
#include <decomp/symbol.hpp>
#include <decomp/symbol.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::recomp::symbol_table_t |
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode. More... | |
+Namespaces | theo | | | theo::recomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::recomp | this namespace encompasses all recomposition related code. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/transform/operation.hpp>
#include <obf/transform/operation.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::transform::xor_op_t |
+Namespaces | theo | | | theo::obf | | | theo::obf::transform | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. | namespace | theo::obf::transform | this namespace encompasses the code for transforming relocations. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <cstddef>
#include <cstdint>
#include <obf/transform/transform.hpp>
#include <obf/transform/transform.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::recomp::reloc_t |
meta data about a relocation for a symbol More... | |
+Namespaces | theo | | | theo::recomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::recomp | this namespace encompasses all recomposition related code. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::engine_t, including all inherited members.
add_pass(pass_t *pass) | theo::obf::engine_t | |
get() | theo::obf::engine_t | static |
get() | theo::obf::engine_t | static |
run(decomp::symbol_t *sym) | theo::obf::engine_t |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::decomp::routine_t, including all inherited members.
data() | theo::decomp::routine_t | |
decompose() | theo::decomp::routine_t | |
decompose() | theo::decomp::routine_t | |
routine_t(coff::symbol_t *sym, coff::image_t *img, coff::section_header_t *scn, std::vector< std::uint8_t > &fn, sym_type_t dcmp_type) | theo::decomp::routine_t | explicit |
scn() | theo::decomp::routine_t | |
scn() | theo::decomp::routine_t |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/transform/operation.hpp>
#include <obf/transform/operation.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::transform::add_op_t |
+Namespaces | theo | | | theo::obf | | | theo::obf::transform | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. | namespace | theo::obf::transform | this namespace encompasses the code for transforming relocations. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <spdlog/spdlog.h>
#include <decomp/decomp.hpp>
#include <obf/engine.hpp>
#include <recomp/recomp.hpp>
#include <recomp/symbol_table.hpp>
#include <obf/passes/jcc_rewrite_pass.hpp>
#include <obf/passes/next_inst_pass.hpp>
#include <obf/passes/reloc_transform_pass.hpp>
#include <decomp/decomp.hpp>
#include <obf/engine.hpp>
#include <recomp/recomp.hpp>
#include <recomp/symbol_table.hpp>
#include <obf/passes/jcc_rewrite_pass.hpp>
#include <obf/passes/next_inst_pass.hpp>
#include <obf/passes/reloc_transform_pass.hpp>
#include <optional>
#include <tuple>
#include <vector>
#include <xed-decode.h>
#include <xed-interface.h>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::theo_t |
the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp. More... | |
+Namespaces | theo | | namespace | theo | The outer most encompassing namespace of this project. |
+Macros#define | XED_ENCODER | | |
+Typedefsusing | theo::lnk_fns_t = std::tuple< recomp::allocator_t, recomp::copier_t, recomp::resolver_t > | | tuple of functions used by theo to allocate, copy, and resolve symbols. More... | | |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <theo.hpp>
#include <theo.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | namespace | theo | The outer most encompassing namespace of this project. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <spdlog/spdlog.h>
#include <set>
#include <tuple>
#include <vector>
#include <decomp/routine.hpp>
#include <recomp/symbol_table.hpp>
#include <decomp/routine.hpp>
#include <recomp/symbol_table.hpp>
#include <coff/archive.hpp>
#include <coff/image.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::decomp::decomp_t |
the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. More... | |
+Namespaces | theo | | | theo::decomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::decomp | the namespace that contains all of the decomposition related code. |
+Typedefsusing | theo::decomp::sym_data_t = std::tuple< coff::image_t *, coff::symbol_t *, std::uint32_t > | |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <decomp/routine.hpp>
#include <decomp/routine.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::decomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::decomp | the namespace that contains all of the decomposition related code. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::recomp::symbol_table_t, including all inherited members.
for_each(std::function< void(decomp::symbol_t &sym)> fn) | theo::recomp::symbol_table_t | |
put_symbol(decomp::symbol_t &sym) | theo::recomp::symbol_table_t | |
put_symbol(decomp::symbol_t &sym) | theo::recomp::symbol_table_t | |
put_symbols(std::vector< decomp::symbol_t > &syms) | theo::recomp::symbol_table_t | |
size() | theo::recomp::symbol_table_t | |
size() | theo::recomp::symbol_table_t | |
sym_from_alloc(std::uintptr_t allocated_at) | theo::recomp::symbol_table_t | |
sym_from_hash(std::size_t hash) | theo::recomp::symbol_table_t | |
sym_from_hash(std::size_t hash) | theo::recomp::symbol_table_t | |
symbol_table_t() | theo::recomp::symbol_table_t | inline |
symbol_table_t(const std::vector< decomp::symbol_t > &&syms) | theo::recomp::symbol_table_t | |
symbol_table_t(const std::vector< decomp::symbol_t > &&syms) | theo::recomp::symbol_table_t |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/pass.hpp>
#include <obf/pass.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::jcc_rewrite_pass_t |
jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. More... | |
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::transform::operation_t, including all inherited members.
get_transform() | theo::obf::transform::operation_t | inline |
inverse() | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
operation_t(transform_t op, xed_iclass_enum_t type) | theo::obf::transform::operation_t | inlineexplicit |
get_transform() | theo::obf::transform::operation_t | inline |
inverse() | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
operation_t(transform_t op, xed_iclass_enum_t type) | theo::obf::transform::operation_t | inlineexplicit |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
type() | theo::obf::transform::operation_t | inline |
type() | theo::obf::transform::operation_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::recomp::reloc_t, including all inherited members.
add_transform(std::pair< obf::transform::transform_t *, std::uint32_t > entry) | theo::recomp::reloc_t | inline |
get_transforms() | theo::recomp::reloc_t | inline |
get_transforms() | theo::recomp::reloc_t | inline |
hash() | theo::recomp::reloc_t | inline |
name() | theo::recomp::reloc_t | inline |
name() | theo::recomp::reloc_t | inline |
offset() | theo::recomp::reloc_t | inline |
offset(std::uint32_t offset) | theo::recomp::reloc_t | inline |
offset(std::uint32_t offset) | theo::recomp::reloc_t | inline |
reloc_t(std::uint32_t offset, std::size_t hash, const std::string &&sym_name) | theo::recomp::reloc_t | inlineexplicit |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::reloc_transform_pass_t, including all inherited members.
get() | theo::obf::reloc_transform_pass_t | static |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
run(decomp::symbol_t *sym) | theo::obf::reloc_transform_pass_t | virtual |
sym_type() | theo::obf::pass_t | inline |
sym_type() | theo::obf::pass_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::next_inst_pass_t, including all inherited members.
get() | theo::obf::next_inst_pass_t | static |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
run(decomp::symbol_t *sym) | theo::obf::next_inst_pass_t | virtual |
sym_type() | theo::obf::pass_t | inline |
sym_type() | theo::obf::pass_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <decomp/decomp.hpp>
#include <obf/engine.hpp>
#include <recomp/symbol_table.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::recomp::recomp_t |
the main class responsible for recomposition More... | |
+Namespaces | theo | | | theo::recomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::recomp | this namespace encompasses all recomposition related code. |
+Typedefsusing | theo::recomp::resolver_t = std::function< std::uintptr_t(std::string)> | |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::decomp::decomp_t, including all inherited members.
decomp_t(std::vector< std::uint8_t > &lib, recomp::symbol_table_t *syms) | theo::decomp::decomp_t | explicit |
decompose(std::string &entry_sym) | theo::decomp::decomp_t | |
decompose(std::string &entry_sym) | theo::decomp::decomp_t | |
lib() | theo::decomp::decomp_t | |
objs() | theo::decomp::decomp_t | |
objs() | theo::decomp::decomp_t | |
rtns() | theo::decomp::decomp_t | |
scn_hash_tbl() | theo::decomp::decomp_t | |
scn_hash_tbl() | theo::decomp::decomp_t | |
syms() | theo::decomp::decomp_t |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there. More...
-#include <pass.hpp>
#include "pass.hpp"
+Public Member Functions | pass_t (decomp::sym_type_t sym_type) | | |||||
the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there.
-in the constructor of your pass you must call the super constructor (the pass_t constructor) and pass it the type of symbol which you are interesting in receiving.
+the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there.
+in the constructor of your pass you must call the super constructor (the pass_t constructor) and pass it the type of symbol which you are interesting in receiving.
+ +Implemented in theo::obf::reloc_transform_pass_t, theo::obf::next_inst_pass_t, theo::obf::jcc_rewrite_pass_t, and theo::obf::hello_world_pass_t.
+Implemented in theo::obf::hello_world_pass_t, theo::obf::jcc_rewrite_pass_t, theo::obf::next_inst_pass_t, and theo::obf::reloc_transform_pass_t.
gets the passes symbol type.
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
the main class responsible for recomposition More...
-#include <recomp.hpp>
#include "recomp.hpp"
+Public Member Functions | recomp_t (decomp::decomp_t *dcmp, allocator_t alloc, copier_t copy, resolver_t resolve) | | |||||
the main class responsible for recomposition
+the main class responsible for recomposition
+ +Definition at line 64 of file recomp.hpp.
Definition at line 34 of file recomp.cpp.
+when called, this function allocates space for every symbol.
-Definition at line 40 of file recomp.cpp.
+References theo::recomp::symbol_table_t::for_each(), theo::decomp::decomp_t::syms(), and theo::decomp::symbol_t::type().
+ +Referenced by theo::theo_t::compose().
+Definition at line 163 of file recomp.cpp.
+Definition at line 167 of file recomp.cpp.
+when called, this function copies symbols into allocations.
-Definition at line 155 of file recomp.cpp.
+References theo::decomp::symbol_t::allocated_at(), and theo::decomp::symbol_t::data().
+ +Referenced by theo::theo_t::compose().
+when called, this function resolves all relocations in every symbol.
-Definition at line 92 of file recomp.cpp.
+References theo::decomp::symbol_t::data(), theo::decomp::function, theo::recomp::reloc_t::get_transforms(), theo::recomp::reloc_t::hash(), theo::decomp::instruction, theo::recomp::reloc_t::name(), theo::decomp::symbol_t::name(), theo::recomp::reloc_t::offset(), theo::decomp::symbol_t::relocs(), theo::decomp::symbol_t::scn(), theo::decomp::section, and theo::decomp::symbol_t::type().
+ +Referenced by theo::theo_t::compose().
+Definition at line 175 of file recomp.cpp.
+References theo::decomp::symbol_t::hash().
+Definition at line 171 of file recomp.cpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
This pass is used to generate transformations and jmp code to change RIP to the next instruction. More...
-#include <next_inst_pass.hpp>
#include "next_inst_pass.hpp"
+Public Member Functionsvoid | run (decomp::symbol_t *sym) | | |||||
pass_t (decomp::sym_type_t sym_type) | |||||||
the explicit constructor of the pass_t base class. More... | |||||||
virtual void | run (decomp::symbol_t *sym)=0 | ||||||
virtual method which must be implimented by the pass that inherits this class. More... | |||||||
decomp::sym_type_t | sym_type () | ||||||
gets the passes symbol type. More... | |||||||
+Static Public Member Functionsstatic next_inst_pass_t * | get () | | |
This pass is used to generate transformations and jmp code to change RIP to the next instruction.
-given the following code (get pml4 address from cr3):
-get_pml4: 0: 48 c7 c0 ff 0f 00 00 mov rax,0xfff 7: 48 f7 d0 not rax a: 0f 20 da mov rdx,cr3 d: 48 21 c2 and rdx,rax 10: b1 00 mov cl,0x0 12: 48 d3 e2 shl rdx,cl 15: 48 89 d0 mov rax,rdx 18: c3 ret
-this pass will break up each instruction so that it can be anywhere in a linear virtual address space. this pass will not work on rip relative code, however clang will not generate such code when compiled with "-mcmodel=large"
-get_pml4@0: mov rax, 0xFFF push [next_inst_addr_enc] xor [rsp], 0x3243342 ; a random number of transformations here... ret next_inst_addr_enc: ; encrypted address of the next instruction goes here.
-get_pml4@7: not rax push [next_inst_addr_enc] xor [rsp], 0x93983498 ; a random number of transformations here... ret next_inst_addr_enc: ; encrypted address of the next instruction goes here.
-this process is continued for each instruction in the function. the last instruction "ret" will have no code generated for it as there is no next instruction.
-this pass also only runs at the instruction level, theodosius internally breaks up functions inside of the ".split" section into individual instruction symbols. this process also creates a psuedo relocation which simply tells this pass that there needs to be a relocation to the next symbol. the offset for these psuedo relocations is zero.
+This pass is used to generate transformations and jmp code to change RIP to the next instruction.
+given the following code (get pml4 address from cr3):
+get_pml4: 0: 48 c7 c0 ff 0f 00 00 mov rax,0xfff 7: 48 f7 d0 not rax a: 0f 20 da mov rdx,cr3 d: 48 21 c2 and rdx,rax 10: b1 00 mov cl,0x0 12: 48 d3 e2 shl rdx,cl 15: 48 89 d0 mov rax,rdx 18: c3 ret
+this pass will break up each instruction so that it can be anywhere in a linear virtual address space. this pass will not work on rip relative code, however clang will not generate such code when compiled with "-mcmodel=large"
+get_pml4@0: mov rax, 0xFFF push [next_inst_addr_enc] xor [rsp], 0x3243342 ; a random number of transformations here... ret next_inst_addr_enc: ; encrypted address of the next instruction goes here.
+get_pml4@7: not rax push [next_inst_addr_enc] xor [rsp], 0x93983498 ; a random number of transformations here... ret next_inst_addr_enc: ; encrypted address of the next instruction goes here.
+this process is continued for each instruction in the function. the last instruction "ret" will have no code generated for it as there is no next instruction.
+this pass also only runs at the instruction level, theodosius internally breaks up functions inside of the ".split" section into individual instruction symbols. this process also creates a psuedo relocation which simply tells this pass that there needs to be a relocation to the next symbol. the offset for these psuedo relocations is zero.
+ +Definition at line 85 of file next_inst_pass.hpp.
Definition at line 34 of file next_inst_pass.cpp.
+Referenced by main(), and theo::obf::jcc_rewrite_pass_t::run().
+Implements theo::obf::pass_t.
-Definition at line 38 of file next_inst_pass.cpp.
+References theo::decomp::symbol_t::data(), and theo::obf::transform::generate().
+ +Referenced by theo::obf::jcc_rewrite_pass_t::run().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/transform/transform.hpp>
#include <recomp/reloc.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::obf | | | theo::obf::transform | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. | namespace | theo::obf::transform | this namespace encompasses the code for transforming relocations. |
+Functionsstd::vector< std::uint8_t > | theo::obf::transform::generate (xed_decoded_inst_t *inst, recomp::reloc_t *reloc, std::uint8_t low, std::uint8_t high) | | generate a sequence of transformations given an instruction that has a relocation in it. More... | | std::vector< std::uint8_t > | theo::obf::transform::generate (xed_decoded_inst_t *inst, recomp::reloc_t *reloc, std::uint8_t low, std::uint8_t high) | | generate a sequence of transformations given an instruction that has a relocation in it. More... | |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::transform::add_op_t, including all inherited members.
get() | theo::obf::transform::add_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
get() | theo::obf::transform::add_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
inverse() | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
operation_t(transform_t op, xed_iclass_enum_t type) | theo::obf::transform::operation_t | inlineexplicit |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
type() | theo::obf::transform::operation_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/pass.hpp>
#include <obf/pass.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::next_inst_pass_t |
This pass is used to generate transformations and jmp code to change RIP to the next instruction. More... | |
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
hello world pass example of how to inherit pass_t. More...
-#include <hello_world_pass.hpp>
#include "hello_world_pass.hpp"
+Public Member Functionsvoid | run (decomp::symbol_t *sym) | | |||||
pass_t (decomp::sym_type_t sym_type) | |||||||
the explicit constructor of the pass_t base class. More... | |||||||
virtual void | run (decomp::symbol_t *sym)=0 | ||||||
virtual method which must be implimented by the pass that inherits this class. More... | |||||||
decomp::sym_type_t | sym_type () | ||||||
gets the passes symbol type. More... | |||||||
+Static Public Member Functionsstatic hello_world_pass_t * | get () | | static hello_world_pass_t * | get () | |
hello world pass example of how to inherit pass_t.
+hello world pass example of how to inherit pass_t.
+ +Definition at line 39 of file hello_world_pass.hpp.
static hello_world_pass_t* theo::obf::hello_world_pass_t::get | +static hello_world_pass_t * theo::obf::hello_world_pass_t::get | ( | ) | @@ -133,14 +137,18 @@ Static Public Member Functions |
Definition at line 45 of file hello_world_pass.hpp.
+Referenced by main().
+Implements theo::obf::pass_t.
-Definition at line 50 of file hello_world_pass.hpp.
+References theo::decomp::symbol_t::hash(), and theo::decomp::symbol_t::name().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <add_op.hpp>
#include "add_op.hpp"
+Static Public Member Functionsstatic add_op_t * | get () | | static add_op_t * | get () | | Static Public Member Functions inherited from theo::obf::transform::operation_t | static std::size_t | random (std::size_t lowest, std::size_t largest) | generate a random number in a range. More... |
+Additional Inherited Members Public Member Functions inherited from theo::obf::transform::operation_t | | operation_t (transform_t op, xed_iclass_enum_t type) | | explicit constructor for operation_t More... | | xed_iclass_enum_t | inverse () | | gets the inverse operation of the current operation. More... | | xed_iclass_enum_t | type () | | gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... More... | | |
Definition at line 35 of file add_op.hpp.
+static add_op_t* theo::obf::transform::add_op_t::get | +static add_op_t * theo::obf::transform::add_op_t::get | ( | ) | @@ -138,20 +139,22 @@ Additional Inherited Members |
Definition at line 42 of file add_op.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <spdlog/spdlog.h>
#include <xed-decode.h>
#include <xed-interface.h>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::transform::operation_t |
operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t). More... | |
+Namespaces | theo | | | theo::obf | | | theo::obf::transform | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. | namespace | theo::obf::transform | this namespace encompasses the code for transforming relocations. |
+Macros#define | XED_ENCODER | | |
+Typedefsusing | theo::obf::transform::transform_t = std::function< std::size_t(std::size_t, std::uint32_t)> | | lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value used in transformation). More... | | |
Definition at line 39 of file operation.hpp.
++ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
this is the main namespace for obfuscation related things. More...
+Namespaces | transform | | namespace | transform | this namespace encompasses the code for transforming relocations. |
-Classes | |
+Data Structures | |
class | engine_t |
singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. More... | |
class | pass_t |
the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there. More... | |
class | hello_world_pass_t |
hello world pass example of how to inherit pass_t. More... | |
class | jcc_rewrite_pass_t |
jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. More... | |
class | next_inst_pass_t |
This pass is used to generate transformations and jmp code to change RIP to the next instruction. More... | |
class | pass_t |
the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there. More... | |
class | reloc_transform_pass_t |
this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol. More... | |
class | hello_world_pass_t |
hello world pass example of how to inherit pass_t. More... | |
this is the main namespace for obfuscation related things.
+this is the main namespace for obfuscation related things.
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. More...
-#include <decomp.hpp>
#include "decomp.hpp"
+Public Member Functions | decomp_t (std::vector< std::uint8_t > &lib, recomp::symbol_table_t *syms) | | |||||
the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files.
+the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files.
+ +Definition at line 61 of file decomp.hpp.
Definition at line 34 of file decomp.cpp.
+Definition at line 37 of file decomp.cpp.
+References lib().
+ +Referenced by theo::theo_t::decompose().
+gets a vector of bytes consisting of the lib file.
Definition at line 285 of file decomp.cpp.
+Referenced by decompose().
+gets all the obj files as a vector of a vector of bytes.
Definition at line 289 of file decomp.cpp.
+gets all of the routine objects.
Definition at line 281 of file decomp.cpp.
+gets the section hash table section header --> hash of the section header ptr.
Definition at line 297 of file decomp.cpp.
+gets the symbol table.
Definition at line 293 of file decomp.cpp.
+Referenced by theo::recomp::recomp_t::allocate().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <rol_op.hpp>
#include "rol_op.hpp"
+Static Public Member Functionsstatic rol_op_t * | get () | | static rol_op_t * | get () | | Static Public Member Functions inherited from theo::obf::transform::operation_t | static std::size_t | random (std::size_t lowest, std::size_t largest) | generate a random number in a range. More... |
+Additional Inherited Members Public Member Functions inherited from theo::obf::transform::operation_t | | operation_t (transform_t op, xed_iclass_enum_t type) | | explicit constructor for operation_t More... | | xed_iclass_enum_t | inverse () | | gets the inverse operation of the current operation. More... | | xed_iclass_enum_t | type () | | gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... More... | | |
Definition at line 35 of file rol_op.hpp.
+static rol_op_t* theo::obf::transform::rol_op_t::get | +static rol_op_t * theo::obf::transform::rol_op_t::get | ( | ) | @@ -138,20 +139,22 @@ Additional Inherited Members |
Definition at line 44 of file rol_op.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <sub_op.hpp>
#include "sub_op.hpp"
+Static Public Member Functionsstatic sub_op_t * | get () | | static sub_op_t * | get () | | Static Public Member Functions inherited from theo::obf::transform::operation_t | static std::size_t | random (std::size_t lowest, std::size_t largest) | generate a random number in a range. More... |
+Additional Inherited Members Public Member Functions inherited from theo::obf::transform::operation_t | | operation_t (transform_t op, xed_iclass_enum_t type) | | explicit constructor for operation_t More... | | xed_iclass_enum_t | inverse () | | gets the inverse operation of the current operation. More... | | xed_iclass_enum_t | type () | | gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... More... | | |
Definition at line 35 of file sub_op.hpp.
+static sub_op_t* theo::obf::transform::sub_op_t::get | +static sub_op_t * theo::obf::transform::sub_op_t::get | ( | ) | @@ -138,20 +139,22 @@ Additional Inherited Members |
Definition at line 42 of file sub_op.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <coff/image.hpp>
#include <cstdint>
#include <recomp/reloc.hpp>
#include <recomp/reloc.hpp>
#include <string>
#include <vector>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::decomp::symbol_t |
symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down). More... | |
+Namespaces | theo | | | theo::decomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::decomp | the namespace that contains all of the decomposition related code. |
+Enumerationsenum | theo::decomp::sym_type_t { | theo::decomp::function = 0b00000001 @@ -115,7 +115,7 @@ Enumerations
-
#include <obf/transform/operation.hpp> + #include <obf/transform/operation.hpp> Go to the source code of this file. +Go to the source code of this file.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d6/d8a/rol__op_8hpp_source.html b/doxygen/html/d6/d8a/rol__op_8hpp_source.html new file mode 100644 index 0000000..3c21ea0 --- /dev/null +++ b/doxygen/html/d6/d8a/rol__op_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+rol_op.hpp
+Go to the documentation of this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +Generated by 1.9.3 + + + diff --git a/doxygen/html/d6/da4/reloc__transform__pass_8cpp.html b/doxygen/html/d6/da4/reloc__transform__pass_8cpp.html index 466dc0d..f0dae38 100644 --- a/doxygen/html/d6/da4/reloc__transform__pass_8cpp.html +++ b/doxygen/html/d6/da4/reloc__transform__pass_8cpp.html @@ -2,8 +2,8 @@ - - + +
-
#include <obf/passes/reloc_transform_pass.hpp> + #include <obf/passes/reloc_transform_pass.hpp> Go to the source code of this file. +Go to the source code of this file.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d6/da4/reloc__transform__pass_8cpp_source.html b/doxygen/html/d6/da4/reloc__transform__pass_8cpp_source.html new file mode 100644 index 0000000..b5251d1 --- /dev/null +++ b/doxygen/html/d6/da4/reloc__transform__pass_8cpp_source.html @@ -0,0 +1,157 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+reloc_transform_pass.cpp
+Go to the documentation of this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +Generated by 1.9.3 + + + diff --git a/doxygen/html/d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html b/doxygen/html/d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html index 9b4c512..5fe355e 100644 --- a/doxygen/html/d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html +++ b/doxygen/html/d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html @@ -2,8 +2,8 @@ - - + +
-
+
-
+Static Public Member Functions theo::obf::jcc_rewrite_pass_t Class Reference theo::obf::jcc_rewrite_pass_t Class Reference jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. More... -
Inheritance diagram for theo::obf::jcc_rewrite_pass_t:
@@ -90,7 +89,7 @@ Inheritance diagram for theo::obf::jcc_rewrite_pass_t:
Detailed Description-jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. -given the following code: jnz label1 + |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
Definition at line 35 of file jcc_rewrite_pass.cpp.
+Referenced by main().
+Implements theo::obf::pass_t.
-Definition at line 40 of file jcc_rewrite_pass.cpp.
+References theo::decomp::symbol_t::data(), theo::obf::next_inst_pass_t::get(), theo::decomp::symbol_t::hash(), theo::decomp::symbol_t::img(), theo::decomp::symbol_t::offset(), theo::decomp::symbol_t::relocs(), theo::obf::next_inst_pass_t::run(), and theo::decomp::symbol_t::sym().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/transform/add_op.hpp>
#include <obf/transform/rol_op.hpp>
#include <obf/transform/ror_op.hpp>
#include <obf/transform/sub_op.hpp>
#include <obf/transform/xor_op.hpp>
#include <obf/transform/add_op.hpp>
#include <obf/transform/rol_op.hpp>
#include <obf/transform/ror_op.hpp>
#include <obf/transform/sub_op.hpp>
#include <obf/transform/xor_op.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::obf | | | theo::obf::transform | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. | namespace | theo::obf::transform | this namespace encompasses the code for transforming relocations. |
+Variablesstd::map< xed_iclass_enum_t, operation_t * > | theo::obf::transform::operations | |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::transform::rol_op_t, including all inherited members.
get() | theo::obf::transform::rol_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
get() | theo::obf::transform::rol_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
inverse() | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
operation_t(transform_t op, xed_iclass_enum_t type) | theo::obf::transform::operation_t | inlineexplicit |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
type() | theo::obf::transform::operation_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::hello_world_pass_t, including all inherited members.
get() | theo::obf::hello_world_pass_t | inlinestatic |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
get() | theo::obf::hello_world_pass_t | inlinestatic |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
run(decomp::symbol_t *sym) | theo::obf::hello_world_pass_t | inlinevirtual |
sym_type() | theo::obf::pass_t | inline |
sym_type() | theo::obf::pass_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::decomp::symbol_t, including all inherited members.
allocated_at() const | theo::decomp::symbol_t | |
allocated_at(std::uintptr_t allocated_at) | theo::decomp::symbol_t | |
allocated_at(std::uintptr_t allocated_at) | theo::decomp::symbol_t | |
data() | theo::decomp::symbol_t | |
hash() | theo::decomp::symbol_t | |
hash() | theo::decomp::symbol_t | |
hash(const std::string &sym) | theo::decomp::symbol_t | static |
img() const | theo::decomp::symbol_t | |
img() const | theo::decomp::symbol_t | |
name() const | theo::decomp::symbol_t | |
name(const coff::image_t *img, coff::symbol_t *sym) | theo::decomp::symbol_t | static |
name(const coff::image_t *img, coff::symbol_t *sym) | theo::decomp::symbol_t | static |
offset() const | theo::decomp::symbol_t | |
relocs() | theo::decomp::symbol_t | |
relocs() | theo::decomp::symbol_t | |
scn() const | theo::decomp::symbol_t | |
size() const | theo::decomp::symbol_t | |
size() const | theo::decomp::symbol_t | |
sym() const | theo::decomp::symbol_t | |
symbol_t(coff::image_t *img, std::string name, std::uintptr_t offset, std::vector< std::uint8_t > data, coff::section_header_t *scn={}, coff::symbol_t *sym={}, std::vector< recomp::reloc_t > relocs={}, sym_type_t dcmp_type={}) | theo::decomp::symbol_t | explicit |
symbol_t(coff::image_t *img, std::string name, std::uintptr_t offset, std::vector< std::uint8_t > data, coff::section_header_t *scn={}, coff::symbol_t *sym={}, std::vector< recomp::reloc_t > relocs={}, sym_type_t dcmp_type={}) | theo::decomp::symbol_t | explicit |
type() const | theo::decomp::symbol_t |
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::jcc_rewrite_pass_t, including all inherited members.
get() | theo::obf::jcc_rewrite_pass_t | static |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
pass_t(decomp::sym_type_t sym_type) | theo::obf::pass_t | inlineexplicit |
run(decomp::symbol_t *sym) | theo::obf::jcc_rewrite_pass_t | virtual |
sym_type() | theo::obf::pass_t | inline |
sym_type() | theo::obf::pass_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t). More...
-#include <operation.hpp>
#include "operation.hpp"
+Public Member Functions | operation_t (transform_t op, xed_iclass_enum_t type) | | explicit constructor for operation_t More... | | xed_iclass_enum_t | inverse () | | gets the inverse operation of the current operation. More... | | xed_iclass_enum_t | type () | | gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... More... | | |
+Static Public Member Functionsstatic std::size_t | random (std::size_t lowest, std::size_t largest) | | generate a random number in a range. More... | | |
operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t).
+operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t).
+ +Definition at line 61 of file operation.hpp.
Definition at line 69 of file operation.hpp.
+transform_t* theo::obf::transform::operation_t::get_transform | +transform_t * theo::obf::transform::operation_t::get_transform | ( | ) | @@ -194,11 +196,13 @@ Static Public Member Functions |
-
-
+ pass.hpp File Reference pass.hpp File Reference #include <spdlog/spdlog.h> - #include <decomp/symbol.hpp> - #include <obf/transform/gen.hpp> + #include <decomp/symbol.hpp> + #include <obf/transform/gen.hpp> #include <xed-decode.h> #include <xed-interface.h> Go to the source code of this file. +Go to the source code of this file.
Macro Definition Documentation- +◆ XED_ENCODER
@@ -116,12 +116,14 @@ Macros
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d8/d5a/pass_8hpp_source.html b/doxygen/html/d8/d5a/pass_8hpp_source.html new file mode 100644 index 0000000..9dbafbd --- /dev/null +++ b/doxygen/html/d8/d5a/pass_8hpp_source.html @@ -0,0 +1,161 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+pass.hpp
+Go to the documentation of this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +Generated by 1.9.3 + + + diff --git a/doxygen/html/d8/d67/symbol_8cpp.html b/doxygen/html/d8/d67/symbol_8cpp.html index 498acfa..2a16995 100644 --- a/doxygen/html/d8/d67/symbol_8cpp.html +++ b/doxygen/html/d8/d67/symbol_8cpp.html @@ -2,8 +2,8 @@ - - + +
- #include <decomp/symbol.hpp> + #include <decomp/symbol.hpp> Go to the source code of this file. +Go to the source code of this file.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d8/d67/symbol_8cpp_source.html b/doxygen/html/d8/d67/symbol_8cpp_source.html new file mode 100644 index 0000000..12ff212 --- /dev/null +++ b/doxygen/html/d8/d67/symbol_8cpp_source.html @@ -0,0 +1,201 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+symbol.cpp
+Go to the documentation of this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +Generated by 1.9.3 + + + diff --git a/doxygen/html/d8/d82/namespacetheo_1_1obf_1_1transform.html b/doxygen/html/d8/d82/namespacetheo_1_1obf_1_1transform.html index 3206361..b4ed9bf 100644 --- a/doxygen/html/d8/d82/namespacetheo_1_1obf_1_1transform.html +++ b/doxygen/html/d8/d82/namespacetheo_1_1obf_1_1transform.html @@ -2,8 +2,8 @@ - - + +
-
-
+ theo::obf::transform Namespace Reference theo::obf::transform Namespace Reference this namespace encompasses the code for transforming relocations. More...
Detailed Description-this namespace encompasses the code for transforming relocations. +this namespace encompasses the code for transforming relocations. Typedef Documentation- +◆ transform_t
@@ -131,11 +131,13 @@ Variables
lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value used in transformation). +Definition at line 54 of file operation.hpp. +Function Documentation- -◆ generate()+ +◆ generate()
@@ -144,7 +146,7 @@ Variables
-
+
|
-
#include <obf/transform/operation.hpp> + #include <obf/transform/operation.hpp> Go to the source code of this file. +Go to the source code of this file.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d8/da9/sub__op_8hpp_source.html b/doxygen/html/d8/da9/sub__op_8hpp_source.html new file mode 100644 index 0000000..af41e8c --- /dev/null +++ b/doxygen/html/d8/da9/sub__op_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sub_op.hpp
+Go to the documentation of this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +Generated by 1.9.3 + + + diff --git a/doxygen/html/d8/dce/classtheo_1_1obf_1_1transform_1_1xor__op__t-members.html b/doxygen/html/d8/dce/classtheo_1_1obf_1_1transform_1_1xor__op__t-members.html index 7de9211..02e0406 100644 --- a/doxygen/html/d8/dce/classtheo_1_1obf_1_1transform_1_1xor__op__t-members.html +++ b/doxygen/html/d8/dce/classtheo_1_1obf_1_1transform_1_1xor__op__t-members.html @@ -2,8 +2,8 @@ - - + +
-
-
+ theo::obf::transform::xor_op_t Member List theo::obf::transform::xor_op_t Member List This is the complete list of members for theo::obf::transform::xor_op_t, including all inherited members.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d9/d18/classtheo_1_1obf_1_1engine__t.html b/doxygen/html/d9/d18/classtheo_1_1obf_1_1engine__t.html index aef86cf..c9205cf 100644 --- a/doxygen/html/d9/d18/classtheo_1_1obf_1_1engine__t.html +++ b/doxygen/html/d9/d18/classtheo_1_1obf_1_1engine__t.html @@ -2,8 +2,8 @@ - - + +
-
+
-
+Static Public Member Functions theo::obf::engine_t Class Reference theo::obf::engine_t Class Reference singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. More... -
Detailed Description-singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. +singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. + +Definition at line 42 of file engine.hpp. Member Function Documentation- +◆ add_pass()
@@ -122,13 +123,15 @@ Static Public Member Functions
-
-
+
+
-
+
Definition at line 39 of file engine.cpp. + 39 {
+ 40 passes.push_back(pass);
+ 41}
◆ get()
@@ -153,14 +156,18 @@ Static Public Member Functions get the singleton object of this class.
-
-
-
+
+
Definition at line 34 of file engine.cpp. + 34 {
+ 35 static engine_t obj;
+ 36 return &obj;
+ 37}
Referenced by theo::theo_t::compose(), and main(). +◆ run()
@@ -183,23 +190,25 @@ Static Public Member Functions
-
-
-
-
-
+
+
Definition at line 43 of file engine.cpp. + 43 {
+ 44 std::for_each(passes.begin(), passes.end(), [&](pass_t* pass) {
+ 45 if (sym->type() & pass->sym_type())
+ 46 pass->run(sym);
+ 47 });
+ 48}
The documentation for this class was generated from the following files:
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d9/d27/classtheo_1_1recomp_1_1recomp__t-members.html b/doxygen/html/d9/d27/classtheo_1_1recomp_1_1recomp__t-members.html index 76551a1..9a499b4 100644 --- a/doxygen/html/d9/d27/classtheo_1_1recomp_1_1recomp__t-members.html +++ b/doxygen/html/d9/d27/classtheo_1_1recomp_1_1recomp__t-members.html @@ -2,8 +2,8 @@ - - + +
-
-
+ theo::recomp::recomp_t Member List theo::recomp::recomp_t Member List This is the complete list of members for theo::recomp::recomp_t, including all inherited members.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp.html b/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp.html index 31bd34e..8c01efe 100644 --- a/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp.html +++ b/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp.html @@ -2,8 +2,8 @@ - - + +
- #include <obf/passes/jcc_rewrite_pass.hpp> - #include <obf/passes/next_inst_pass.hpp> + - Go to the source code of this file. +Go to the source code of this file.
-Generated by 1.9.1 +Generated by 1.9.3 diff --git a/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp_source.html b/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp_source.html new file mode 100644 index 0000000..f5698ba --- /dev/null +++ b/doxygen/html/d9/db4/jcc__rewrite__pass_8cpp_source.html @@ -0,0 +1,163 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+jcc_rewrite_pass.cpp
+Go to the documentation of this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +Generated by 1.9.3 + + + diff --git a/doxygen/html/d9/dbc/classtheo_1_1theo__t.html b/doxygen/html/d9/dbc/classtheo_1_1theo__t.html index fdaf8aa..386cad9 100644 --- a/doxygen/html/d9/dbc/classtheo_1_1theo__t.html +++ b/doxygen/html/d9/dbc/classtheo_1_1theo__t.html @@ -2,8 +2,8 @@ - - + +
-
+
-
+Public Member Functions theo::theo_t Class Reference theo::theo_t Class Reference the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp. More... -
Detailed Description-the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp. -You will create an object of this type when using theo. +the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp. +You will create an object of this type when using theo. + +Constructor & Destructor Documentation- +◆ theo_t()
@@ -148,21 +149,20 @@ Public Member Functions |
compose the decomposed module. This will run obfuscation passes, the map and resolve symbols to each other.
Definition at line 56 of file theo.cpp.
+References theo::recomp::recomp_t::allocate(), theo::recomp::recomp_t::copy_syms(), theo::recomp::symbol_table_t::for_each(), theo::obf::engine_t::get(), and theo::recomp::recomp_t::resolve().
+ +Referenced by main().
+decomposes the lib file and return the number of symbols that are used.
Definition at line 45 of file theo.cpp.
+References theo::decomp::decomp_t::decompose().
+ +Referenced by main().
+Definition at line 68 of file theo.cpp.
+References theo::decomp::symbol_t::hash(), and theo::recomp::symbol_table_t::sym_from_hash().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
the namespace that contains all of the decomposition related code. More...
-Classes | |
+Data Structures | |
class | decomp_t |
the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. More... | |
symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down). More... | |
+Typedefsusing | sym_data_t = std::tuple< coff::image_t *, coff::symbol_t *, std::uint32_t > | | meta symbol data. consists of the coff image which contains the coff symbol, the coff symbol itself, and the size (if any) of the symbol. More... | | |
+Enumerationsenum | sym_type_t { | function = 0b00000001 @@ -112,9 +112,9 @@ Enumerations | |
the namespace that contains all of the decomposition related code.
+the namespace that contains all of the decomposition related code.
meta symbol data. consists of the coff image which contains the coff symbol, the coff symbol itself, and the size (if any) of the symbol.
+Definition at line 55 of file decomp.hpp.
+meta symbol type. this is an abstraction upon the coff symbol storage/class type.
Enumerator | |
---|---|
function | |
instruction | |
data | |
section | |
all | |
Enumerator | |
function | |
instruction | |
data | |
section | |
all |
Definition at line 43 of file symbol.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down). More...
-#include <symbol.hpp>
#include "symbol.hpp"
+Public Member Functions | symbol_t (coff::image_t *img, std::string name, std::uintptr_t offset, std::vector< std::uint8_t > data, coff::section_header_t *scn={}, coff::symbol_t *sym={}, std::vector< recomp::reloc_t > relocs={}, sym_type_t dcmp_type={}) | | |||||
gets the hash of the symbol name. More... | |||||||
+Static Public Member Functionsstatic std::size_t | hash (const std::string &sym) | | |||||
symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down).
-this class is used throughout theodosius and is a keystone of the project. ensure you understand how this class works and what it contains.
+symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down).
+this class is used throughout theodosius and is a keystone of the project. ensure you understand how this class works and what it contains.
+ +Definition at line 59 of file symbol.hpp.
Definition at line 34 of file symbol.cpp.
+returns the address where the symbol is allocated.
Definition at line 60 of file symbol.cpp.
+Referenced by allocated_at(), and theo::recomp::recomp_t::copy_syms().
+Definition at line 84 of file symbol.cpp.
+ +References allocated_at().
+returns a vector by reference of bytes containing the data of the symbol.
Definition at line 76 of file symbol.cpp.
+Referenced by theo::recomp::recomp_t::copy_syms(), theo::recomp::recomp_t::resolve(), theo::obf::jcc_rewrite_pass_t::run(), theo::obf::next_inst_pass_t::run(), and theo::obf::reloc_transform_pass_t::run().
+gets the hash of the symbol name.
Definition at line 88 of file symbol.cpp.
+ +References hash().
+ +Referenced by theo::decomp::routine_t::decompose(), hash(), theo::recomp::symbol_table_t::put_symbol(), theo::recomp::recomp_t::resolve(), theo::theo_t::resolve(), theo::obf::hello_world_pass_t::run(), and theo::obf::jcc_rewrite_pass_t::run().
+Definition at line 100 of file symbol.cpp.
+ +References sym().
+gets the imagine in which the symbol is located inside of.
Definition at line 68 of file symbol.cpp.
+Referenced by name(), and theo::obf::jcc_rewrite_pass_t::run().
+gets the name of the symbol.
Definition at line 52 of file symbol.cpp.
+Referenced by theo::decomp::routine_t::decompose(), theo::recomp::recomp_t::resolve(), theo::obf::hello_world_pass_t::run(), and theo::obf::reloc_transform_pass_t::run().
+get the name of a symbol. this function will create a symbol name if the symbol is opaquely named.
-for example in c++ if you define something like this:
-some_struct_t val = { value_one, value_two };
-"val" will be stored in the .data section of the coff file. however the symbol name will be opaque (the name of the symbol will be ".data"). this causes issues with theo since each symbol needs its own unqiue name to generate a unique symbol name hash. for symbols like this, theo will create a name for it with the following format:
-.data::section_index!coff_file_timestamp+offset_into_section
+for example in c++ if you define something like this:
+some_struct_t val = { value_one, value_two };
+"val" will be stored in the .data section of the coff file. however the symbol name will be opaque (the name of the symbol will be ".data"). this causes issues with theo since each symbol needs its own unqiue name to generate a unique symbol name hash. for symbols like this, theo will create a name for it with the following format:
+.data::section_index!coff_file_timestamp+offset_into_section
img | the coff file containing the symbol. |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <recomp/symbol_table.hpp>
#include <recomp/symbol_table.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::recomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::recomp | this namespace encompasses all recomposition related code. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/transform/operation.hpp>
#include <obf/transform/operation.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::transform::ror_op_t |
+Namespaces | theo | | | theo::obf | | | theo::obf::transform | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. | namespace | theo::obf::transform | this namespace encompasses the code for transforming relocations. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/engine.hpp>
#include <obf/engine.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::transform::sub_op_t, including all inherited members.
get() | theo::obf::transform::sub_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
get() | theo::obf::transform::sub_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
inverse() | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
operation_t(transform_t op, xed_iclass_enum_t type) | theo::obf::transform::operation_t | inlineexplicit |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
type() | theo::obf::transform::operation_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <xor_op.hpp>
#include "xor_op.hpp"
+Static Public Member Functionsstatic xor_op_t * | get () | | static xor_op_t * | get () | | Static Public Member Functions inherited from theo::obf::transform::operation_t | static std::size_t | random (std::size_t lowest, std::size_t largest) | generate a random number in a range. More... |
+Additional Inherited Members Public Member Functions inherited from theo::obf::transform::operation_t | | operation_t (transform_t op, xed_iclass_enum_t type) | | explicit constructor for operation_t More... | | xed_iclass_enum_t | inverse () | | gets the inverse operation of the current operation. More... | | xed_iclass_enum_t | type () | | gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... More... | | |
Definition at line 35 of file xor_op.hpp.
+static xor_op_t* theo::obf::transform::xor_op_t::get | +static xor_op_t * theo::obf::transform::xor_op_t::get | ( | ) | @@ -138,20 +139,22 @@ Additional Inherited Members |
Definition at line 42 of file xor_op.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
this namespace encompasses all recomposition related code. More...
-Classes | |
+Data Structures | |
class | recomp_t |
the main class responsible for recomposition More... | |
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode. More... | |
+Typedefsusing | resolver_t = std::function< std::uintptr_t(std::string)> | | |||||
this namespace encompasses all recomposition related code.
+this namespace encompasses all recomposition related code.
a function which is called to allocate space for a symbol.
-the first param is the size of the symbol, the second param is the characteristics of the section which the symbol is allocated in.
+the first param is the size of the symbol, the second param is the characteristics of the section which the symbol is allocated in.
+ +Definition at line 57 of file recomp.hpp.
a function which is called by recomp_t to copy symbols into memory.
+Definition at line 49 of file recomp.hpp.
+a function which is called by recomp_t to resolve external symbols
+Definition at line 44 of file recomp.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
The outer most encompassing namespace of this project. More...
+Namespaces | decomp | | | obf | | | recomp | | namespace | decomp | the namespace that contains all of the decomposition related code. | namespace | obf | this is the main namespace for obfuscation related things. | namespace | recomp | this namespace encompasses all recomposition related code. |
-Classes | |
+Data Structures | |
class | theo_t |
the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp. More... | |
+Typedefsusing | lnk_fns_t = std::tuple< recomp::allocator_t, recomp::copier_t, recomp::resolver_t > | | tuple of functions used by theo to allocate, copy, and resolve symbols. More... | | |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <recomp/recomp.hpp>
#include <recomp/recomp.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::recomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::recomp | this namespace encompasses all recomposition related code. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode. More...
-#include <symbol_table.hpp>
#include "symbol_table.hpp"
+Public Member Functions | symbol_table_t () | | |||||
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode.
+this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode.
+ +Definition at line 45 of file symbol_table.hpp.
default constructor. does nothing.
-Definition at line 34 of file symbol_table.cpp.
+Definition at line 49 of file symbol_table.cpp.
+Referenced by theo::recomp::recomp_t::allocate(), and theo::theo_t::compose().
+Definition at line 40 of file symbol_table.cpp.
+References theo::decomp::symbol_t::hash().
+Definition at line 44 of file symbol_table.cpp.
+returns the size of the symbol table.
Definition at line 72 of file symbol_table.cpp.
+Definition at line 60 of file symbol_table.cpp.
+Definition at line 54 of file symbol_table.cpp.
+Referenced by theo::theo_t::resolve().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <ror_op.hpp>
#include "ror_op.hpp"
+Static Public Member Functionsstatic ror_op_t * | get () | | static ror_op_t * | get () | | Static Public Member Functions inherited from theo::obf::transform::operation_t | static std::size_t | random (std::size_t lowest, std::size_t largest) | generate a random number in a range. More... |
+Additional Inherited Members Public Member Functions inherited from theo::obf::transform::operation_t | | operation_t (transform_t op, xed_iclass_enum_t type) | | explicit constructor for operation_t More... | | xed_iclass_enum_t | inverse () | | gets the inverse operation of the current operation. More... | | xed_iclass_enum_t | type () | | gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... More... | | |
Definition at line 35 of file ror_op.hpp.
+static ror_op_t* theo::obf::transform::ror_op_t::get | +static ror_op_t * theo::obf::transform::ror_op_t::get | ( | ) | @@ -138,20 +139,22 @@ Additional Inherited Members |
Definition at line 44 of file ror_op.hpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::hello_world_pass_t |
hello world pass example of how to inherit pass_t. More... | |
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol. More...
-#include <reloc_transform_pass.hpp>
#include "reloc_transform_pass.hpp"
+Public Member Functionsvoid | run (decomp::symbol_t *sym) | | |||||
pass_t (decomp::sym_type_t sym_type) | |||||||
the explicit constructor of the pass_t base class. More... | |||||||
virtual void | run (decomp::symbol_t *sym)=0 | ||||||
virtual method which must be implimented by the pass that inherits this class. More... | |||||||
decomp::sym_type_t | sym_type () | ||||||
gets the passes symbol type. More... | |||||||
+Static Public Member Functionsstatic reloc_transform_pass_t * | get () | | |
this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol.
-given the following code:
mov rax, &MessageBoxA ++this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol.
+given the following code:
mov rax, &MessageBoxAthis pass will generate a random number of transformations to encrypt the address of "MessageBoxA". These transformations will then be applied by theodosius internally when resolving relocations.
mov rax, enc_MessageBoxA xor rax, 0x389284324 add rax, 0x345332567 ror rax, 0x5353 -Member Function Documentation
- +
Definition at line 56 of file reloc_transform_pass.hpp.
+Definition at line 34 of file reloc_transform_pass.cpp.
+Referenced by main().
+Implements theo::obf::pass_t.
-Definition at line 39 of file reloc_transform_pass.cpp.
+References theo::decomp::symbol_t::data(), theo::obf::transform::generate(), and theo::decomp::symbol_t::name().
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <decomp/decomp.hpp>
#include <decomp/decomp.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::decomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::decomp | the namespace that contains all of the decomposition related code. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
meta data about a relocation for a symbol More...
-#include <reloc.hpp>
#include "reloc.hpp"
+Public Member Functions | reloc_t (std::uint32_t offset, std::size_t hash, const std::string &&sym_name) | | |||||
void | add_transform (std::pair< obf::transform::transform_t *, std::uint32_t > entry) | ||||||
adds a transformation to be applied to the relocation prior to writing it into the symbol. More... | |||||||
std::vector< std::pair< obf::transform::transform_t *, std::uint32_t > > & | get_transforms () | ||||||
gets the vector of transformation. More... | |||||||
std::vector< std::pair< obf::transform::transform_t *, std::uint32_t > > & | get_transforms () | ||||||
gets the vector of transformation. More... | |||||||
Definition at line 91 of file reloc.hpp.
+Referenced by theo::obf::transform::generate().
+std::vector<std::pair<obf::transform::transform_t*, std::uint32_t> >& theo::recomp::reloc_t::get_transforms | +std::vector< std::pair< obf::transform::transform_t *, std::uint32_t > > & theo::recomp::reloc_t::get_transforms | ( | ) | @@ -225,13 +230,17 @@ Public Member Functions |
Definition at line 82 of file reloc.hpp.
+References offset().
+ +Referenced by offset().
+
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::theo_t, including all inherited members.
compose() | theo::theo_t | |
decompose() | theo::theo_t | |
decompose() | theo::theo_t | |
resolve(const std::string &&sym) | theo::theo_t | |
theo_t(std::vector< std::uint8_t > &lib, lnk_fns_t lnkr_fns, const std::string &&entry_sym) | theo::theo_t | explicit |
theo_t(std::vector< std::uint8_t > &lib, lnk_fns_t lnkr_fns, const std::string &&entry_sym) | theo::theo_t | explicit |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
Example run using demolib.lib as the target lib. Note the hello_world_pass_t
output. Refer to main.cpp for more information.
Example run using demolib.lib as the target lib. Note the hello_world_pass_t
output. Refer to main.cpp for more information.
- Theodosius
- v3.0
+
+ |
+ |
@@ -31,21 +31,22 @@
Theodosius v3.0
Jit linker, mapper, obfuscator, and mutator
|
This is the complete list of members for theo::obf::transform::ror_op_t, including all inherited members.
get() | theo::obf::transform::ror_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
get() | theo::obf::transform::ror_op_t | inlinestatic |
get_transform() | theo::obf::transform::operation_t | inline |
inverse() | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
native(const xed_decoded_inst_t *inst, std::uint32_t imm) | theo::obf::transform::operation_t | inline |
operation_t(transform_t op, xed_iclass_enum_t type) | theo::obf::transform::operation_t | inlineexplicit |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
random(std::size_t lowest, std::size_t largest) | theo::obf::transform::operation_t | inlinestatic |
type() | theo::obf::transform::operation_t | inline |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::engine_t |
singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. More... | |
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/pass.hpp>
#include <obf/transform/operation.hpp>
#include <obf/transform/transform.hpp>
#include <obf/pass.hpp>
#include <obf/transform/operation.hpp>
#include <obf/transform/transform.hpp>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::obf::reloc_transform_pass_t |
this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol. More... | |
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <map>
#include <string>
#include <vector>
#include <spdlog/spdlog.h>
#include <decomp/symbol.hpp>
#include <decomp/symbol.hpp>
#include <xed-decode.h>
#include <xed-interface.h>
Go to the source code of this file.
+Go to the source code of this file.
-Classes | |
+Data Structures | |
class | theo::decomp::routine_t |
the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols. More... | |
+Namespaces | theo | | | theo::decomp | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::decomp | the namespace that contains all of the decomposition related code. |
+Macros#define | XED_ENCODER | | |||||
Definition at line 45 of file routine.hpp.
+Definition at line 39 of file routine.hpp.
++ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <Windows.h>
#include <fstream>
#include <iostream>
#include <spdlog/spdlog.h>
#include <theo.hpp>
#include <obf/engine.hpp>
#include <obf/passes/jcc_rewrite_pass.hpp>
#include <obf/passes/next_inst_pass.hpp>
#include <obf/passes/reloc_transform_pass.hpp>
#include "hello_world_pass.hpp"
#include <theo.hpp>
#include <obf/engine.hpp>
#include <obf/passes/jcc_rewrite_pass.hpp>
#include <obf/passes/next_inst_pass.hpp>
#include <obf/passes/reloc_transform_pass.hpp>
#include "hello_world_pass.hpp"
Go to the source code of this file.
+Go to the source code of this file.
+Functionsint | main (int argc, char *argv[]) | | example usage of how to interface with theo. please refer to the source code of this function for details. More... | | |
Definition at line 57 of file main.cpp.
+References theo::theo_t::compose(), theo::theo_t::decompose(), theo::obf::hello_world_pass_t::get(), theo::obf::engine_t::get(), theo::obf::jcc_rewrite_pass_t::get(), theo::obf::next_inst_pass_t::get(), and theo::obf::reloc_transform_pass_t::get().
++ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
#include <obf/passes/next_inst_pass.hpp>
#include <obf/passes/next_inst_pass.hpp>
Go to the source code of this file.
+Go to the source code of this file.
+Namespaces | theo | | | theo::obf | | namespace | theo | The outer most encompassing namespace of this project. | namespace | theo::obf | this is the main namespace for obfuscation related things. |
+ |
+ Theodosius v3.0
+
+ Jit linker, symbol mapper, and obfuscator
+ |
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols. More...
-#include <routine.hpp>
#include "routine.hpp"
+Public Member Functions | routine_t (coff::symbol_t *sym, coff::image_t *img, coff::section_header_t *scn, std::vector< std::uint8_t > &fn, sym_type_t dcmp_type) | | |||||
the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols.
+the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols.
+ +Definition at line 53 of file routine.hpp.
Definition at line 34 of file routine.cpp.
+gets the function bytes.
Definition at line 172 of file routine.cpp.
+Referenced by decompose().
+decompose the function into symbol(s).
Definition at line 41 of file routine.cpp.
+References data(), theo::decomp::function, theo::decomp::symbol_t::hash(), theo::decomp::instruction, and theo::decomp::symbol_t::name().
+gets the section header of the section in which the symbol is located in.
Definition at line 168 of file routine.cpp.
+
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | jcc_rewrite_pass.hpp [code] | | file | next_inst_pass.hpp [code] | | file | reloc_transform_pass.hpp [code] | | file | jcc_rewrite_pass.hpp [code] | file | next_inst_pass.hpp [code] | file | reloc_transform_pass.hpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | decomp.cpp [code] | | file | routine.cpp [code] | | file | symbol.cpp [code] | | file | decomp.cpp [code] | file | routine.cpp [code] | file | symbol.cpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | decomp.hpp [code] | | file | routine.hpp [code] | | file | symbol.hpp [code] | | file | decomp.hpp [code] | file | routine.hpp [code] | file | symbol.hpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Directoriesdirectory | decomp | | directory | obf | | directory | recomp | | directory | decomp | directory | obf | directory | recomp |
+Filesfile | theo.cpp [code] | | file | theo.cpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Directoriesdirectory | passes | | directory | passes |
+Filesfile | engine.cpp [code] | | file | engine.cpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Directoriesdirectory | decomp | | directory | obf | | directory | recomp | | directory | decomp | directory | obf | directory | recomp |
+Filesfile | theo.hpp [code] | | file | theo.hpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | recomp.hpp [code] | | file | reloc.hpp [code] | | file | symbol_table.hpp [code] | | file | recomp.hpp [code] | file | reloc.hpp [code] | file | symbol_table.hpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | jcc_rewrite_pass.cpp [code] | | file | next_inst_pass.cpp [code] | | file | reloc_transform_pass.cpp [code] | | file | jcc_rewrite_pass.cpp [code] | file | next_inst_pass.cpp [code] | file | reloc_transform_pass.cpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | hello_world_pass.hpp [code] | | file | main.cpp [code] | | file | hello_world_pass.hpp [code] | file | main.cpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | recomp.cpp [code] | | file | symbol_table.cpp [code] | | file | recomp.cpp [code] | file | symbol_table.cpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Directoriesdirectory | passes | | directory | transform | | directory | passes | directory | transform |
+Filesfile | engine.hpp [code] | | file | pass.hpp [code] | | file | engine.hpp [code] | file | pass.hpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
+Filesfile | add_op.hpp [code] | | file | gen.hpp [code] | | file | operation.hpp [code] | | file | rol_op.hpp [code] | | file | ror_op.hpp [code] | | file | sub_op.hpp [code] | | file | transform.hpp [code] | | file | xor_op.hpp [code] | | file | add_op.hpp [code] | file | gen.hpp [code] | file | operation.hpp [code] | file | rol_op.hpp [code] | file | ror_op.hpp [code] | file | sub_op.hpp [code] | file | transform.hpp [code] | file | xor_op.hpp [code] |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
Ctheo::decomp::decomp_t | the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files |
Ctheo::obf::engine_t | singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them |
▼Ctheo::obf::transform::operation_t | operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t) |
Ctheo::decomp::decomp_t | the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. |
Ctheo::obf::engine_t | singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. |
▼Ctheo::obf::transform::operation_t | operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t). |
Ctheo::obf::transform::add_op_t | |
Ctheo::obf::transform::rol_op_t | |
Ctheo::obf::transform::ror_op_t | |
Ctheo::obf::transform::sub_op_t | |
Ctheo::obf::transform::xor_op_t | |
▼Ctheo::obf::pass_t | the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual function and declare the logic of your pass there |
Ctheo::obf::hello_world_pass_t | hello world pass example of how to inherit pass_t |
Ctheo::obf::hello_world_pass_t | hello world pass example of how to inherit pass_t. |
Ctheo::obf::jcc_rewrite_pass_t | jcc rewrite pass which rewrites rip relative jcc's so that they are position independent |
Ctheo::obf::next_inst_pass_t | This pass is used to generate transformations and jmp code to change RIP to the next instruction |
Ctheo::obf::reloc_transform_pass_t | this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol |
Ctheo::recomp::recomp_t | the main class responsible for recomposition |
Ctheo::recomp::reloc_t | meta data about a relocation for a symbol |
Ctheo::decomp::routine_t | the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols |
Ctheo::decomp::routine_t | the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols. |
Ctheo::decomp::symbol_t | symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down) |
Ctheo::recomp::symbol_table_t | this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode |
Ctheo::recomp::symbol_table_t | this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode. |
Ctheo::theo_t | the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp |
- Theodosius
- v3.0
+
+ |
+ |
Theodosius v3.0
- Jit linker, mapper, obfuscator, and mutator
+ Jit linker, symbol mapper, and obfuscator
|
Theodosius (Theo for short) is a jit linker created for obfuscation. The project is extremely modular in design and supports both kernel and usermode projects.
+Theodosius (Theo for short) is a jit linker created for obfuscation. The project is extremely modular in design and supports both kernel and usermode projects. Theo works with static libraries rather than completely compiled binaries. This allows it to easily position, obfuscate, and scatter symbols anywhere as the project takes the place of the linker.
Download and install cmake on your system, then execute the following command in the root dir of this project:
+Download and install cmake on your system, then execute the following command in the root dir of this project:
cmake -B build
Then navigate into dependencies/xed/
and run python3 mfile.py
. Building XED can be tricky on windows, I suggest you use the visual studios console since it has env vars to everything needed to build XED. linux seems to build it just fine...
Then navigate into dependencies/xed/
and run python3 mfile.py
. Building XED can be tricky on windows, I suggest you use the visual studios console since it has env vars to everything needed to build XED. linux seems to build it just fine...
A linker is a program which takes object files produces by a compiler and generates a final executable native to the operating system. A linker interfaces with not only object files but also static libraries, "lib" files. What is a "lib" file? Well a lib file is just an archive of obj's. You can invision it as a zip/rar without any compression, just concatination of said object files.
-Theo is a jit linker, which means it will link objs together and map them into memory all at once. For usability however, instead of handling object files, Theo can parse entire lib files and extract the objects out of the lib.
+A linker is a program which takes object files produces by a compiler and generates a final executable native to the operating system. A linker interfaces with not only object files but also static libraries, "lib" files. What is a "lib" file? Well a lib file is just an archive of obj's. You can invision it as a zip/rar without any compression, just concatination of said object files.
+Theo is a jit linker, which means it will link objs together and map them into memory all at once. For usability however, instead of handling object files, Theo can parse entire lib files and extract the objects out of the lib.
If you define a c++ file called "main.cpp" the compiler will generate an object file by the name of "main.obj". When you refer to data or code defined in another c/c++ file, the linker uses a symbol table to resolve the address of said code/data. In this situation I am the linker and I resolve all of your symbols :).
+If you define a c++ file called "main.cpp" the compiler will generate an object file by the name of "main.obj". When you refer to data or code defined in another c/c++ file, the linker uses a symbol table to resolve the address of said code/data. In this situation I am the linker and I resolve all of your symbols :).
Static linking is when the linker links entire routines not created by you, into your code. Say memcpy
(if its not inlined), will be staticlly linked with the CRT. Static linking also allows for your code to be more independant as all the code you need you bring with you. However, with Theo, you cannot link static libraries which are not compiled with mcmodel=large
. Theo supports actual static linking, in other words, using multiple static libraries at the same time.
Static linking is when the linker links entire routines not created by you, into your code. Say memcpy
(if its not inlined), will be staticlly linked with the CRT. Static linking also allows for your code to be more independant as all the code you need you bring with you. However, with Theo, you cannot link static libraries which are not compiled with mcmodel=large
. Theo supports actual static linking, in other words, using multiple static libraries at the same time.
Dynamic linking is when external symbols are resolved at runtime. This is done by imports and exports in DLL's (dynamiclly linked libraries). Theo supports "dynamic linking", or in better terms, linking against exported routines. You can see examples of this inside of both usermode and kernelmode examples.
+Dynamic linking is when external symbols are resolved at runtime. This is done by imports and exports in DLL's (dynamiclly linked libraries). Theo supports "dynamic linking", or in better terms, linking against exported routines. You can see examples of this inside of both usermode and kernelmode examples.
For integration with visual studios please open install llvm2019 extension, or llvm2017 extension. Once installed, create or open a visual studio project which you want to use with LLVM-Obfuscator and Theo. Open Properties --> Configuration Properties —> General, then set Platform Toolset to LLVM.
-Once LLVM is selected, under the LLVM tab change the clang-cl location to the place where you extracted clang-cl.rar. Finally under Additional Compiler Options (same LLVM tab), set the following: -Xclang -std=c++1z -Xclang -mcode-model -Xclang large -Xclang -fno-jump-tables -mllvm -split -mllvm -split_num=4 -mllvm -sub_loop=4
.
Please refer to the LLVM-Obfuscator Wiki for more information on commandline arguments.
+For integration with visual studios please open install llvm2019 extension, or llvm2017 extension. Once installed, create or open a visual studio project which you want to use with LLVM-Obfuscator and Theo. Open Properties --> Configuration Properties —> General, then set Platform Toolset to LLVM.
+Once LLVM is selected, under the LLVM tab change the clang-cl location to the place where you extracted clang-cl.rar. Finally under Additional Compiler Options (same LLVM tab), set the following: -Xclang -std=c++1z -Xclang -mcode-model -Xclang large -Xclang -fno-jump-tables -mllvm -split -mllvm -split_num=4 -mllvm -sub_loop=4
.
Please refer to the LLVM-Obfuscator Wiki for more information on commandline arguments.
In order to allow for a routine to be scattered throughout a 64bit address space, RIP relative addressing must not be used. In order to facilitate this, a very special version of clang-cl is used which can use mcmodel=large
. This will generate instructions which do not use RIP relative addressing when referencing symbols outside of the routine in which the instruction itself resides. The only exception to this is JCC instructions, (besides call) also known as branching instructions. Take this c++ code for an example:
In order to allow for a routine to be scattered throughout a 64bit address space, RIP relative addressing must not be used. In order to facilitate this, a very special version of clang-cl is used which can use mcmodel=large
. This will generate instructions which do not use RIP relative addressing when referencing symbols outside of the routine in which the instruction itself resides. The only exception to this is JCC instructions, (besides call) also known as branching instructions. Take this c++ code for an example:
This c++ function, compiled by clang-cl with mcmodel=large
, will generate a routine with the following instructions:
This c++ function, compiled by clang-cl with mcmodel=large
, will generate a routine with the following instructions:
As you can see from the code above, (sorry for the terrible syntax highlighting), references to strings and calls to functions are done by first loading the address of the symbol into a register and then interfacing with the symbol.
+As you can see from the code above, (sorry for the terrible syntax highlighting), references to strings and calls to functions are done by first loading the address of the symbol into a register and then interfacing with the symbol.
Each of these instructions can be anywhere in virtual memory and it would not effect code execution one bit.
+Each of these instructions can be anywhere in virtual memory and it would not effect code execution one bit.
Copyright (c) 2022, _xeroxz All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+Copyright (c) 2022, _xeroxz All rights reserved.
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.