Control-Flow-Integrity | proposed hardware-based method | Reverse Engineering library

 by   nsacyber C Version: v1.0.0 License: Non-SPDX

kandi X-RAY | Control-Flow-Integrity Summary

kandi X-RAY | Control-Flow-Integrity Summary

Control-Flow-Integrity is a C library typically used in Utilities, Reverse Engineering applications. Control-Flow-Integrity has no bugs, it has no vulnerabilities and it has low support. However Control-Flow-Integrity has a Non-SPDX License. You can download it from GitHub.

This project captures research to effectively fix the lack of underlying control flow enforcement that would prevent memory corruption exploitation. This mechanism does not exist today but could be implemented in the future by the IT industry.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Control-Flow-Integrity has a low active ecosystem.
              It has 134 star(s) with 50 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              Control-Flow-Integrity has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of Control-Flow-Integrity is v1.0.0

            kandi-Quality Quality

              Control-Flow-Integrity has no bugs reported.

            kandi-Security Security

              Control-Flow-Integrity has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              Control-Flow-Integrity has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              Control-Flow-Integrity releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Control-Flow-Integrity
            Get all kandi verified functions for this library.

            Control-Flow-Integrity Key Features

            No Key Features are available at this moment for Control-Flow-Integrity.

            Control-Flow-Integrity Examples and Code Snippets

            No Code Snippets are available at this moment for Control-Flow-Integrity.

            Community Discussions

            Trending Discussions on Control-Flow-Integrity

            QUESTION

            Shadow stack implementation on x86_64
            Asked 2018-Mar-22 at 16:33

            In Control Flow Integrity, a protected shadow stack is implemented using x86 segments via LDT. But in x86_64 segmentation is disabled. Is there any other mechanism available which can be used to implement a protected stack on x86_64?

            Edit

            Found a recent paper which describes several alternatives.

            ...

            ANSWER

            Answered 2018-Mar-22 at 16:33

            I think the idea for 32-bit CFI is to set a limit on DS/ES/SS, and put the shadow stack outside that, so it can only be corrupted by instructions with a gs: segment override prefix.

            This only works in compat mode (32-bit user-space) on x86-64, because CS/DS/ES/SS have fixed base=0 and no limit when the CPU is in long mode.

            FS and GS can have a non-zero base even in long mode, but even if you could set a limit on those segments, it's the opposite of what you need. (That would protect regular memory from instructions with a gs prefix, instead of the other way around.) Fun fact: @MichaelPetch says most CPUs don't support a limit on those segments in long mode anyway.

            For the Linux x32 ABI (32-bit pointers in long mode), you could put the shadow stack outside the low 4GiB of virtual address space. Normal compiler-generated code always takes care to truncate pointers to 32-bit. The current default code-gen strategy (-maddress-mode=short) is to use address-size prefixes on every instruction with a memory operand, except rsp, which is assumed to always be zero-extended.

            This leads to a lot of wasted address-size prefixes, but it means that code compiled for x32 by current gcc will definitely truncate pointers to 32-bit, even when there's UB, making it impossible for compiler-generated code to load/store outside the low 4GiB of address space.

            I don't think long mode has any general way to make a region of virtual address space accessible only with some kind of special instruction, either a prefix or something else. So if you're defending against normal code using 64-bit operand-size, there are no options that replace segment tricks with baseline x86-64. You'd have to map / unmap the shadow stack, which would be unusably slow.

            There are several other technologies for enforcing / checking control flow these days. Intel's CET (Control-flow Enforcement Technology) gives hardware support for various stuff, including a shadow stack. Grsecurity published a review / critique of it. Their conclusion starts with "In summary, Intel's CET is mainly a hardware implementation of Microsoft's weak CFI implementation with the addition of a shadow stack." IDK if this review is accurate. Grsecurity does produce a competing product (which they acknowledge), so there might be some bias. I'm sure CET is better than nothing.

            See also https://github.com/huku-/research/wiki/Intel-CPU-security-features for a list of x86 (or maybe specifically Intel) CPU features that assist security in general (like MPX bounds checking), not just control-flow.

            Source https://stackoverflow.com/questions/49420204

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Control-Flow-Integrity

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/nsacyber/Control-Flow-Integrity.git

          • CLI

            gh repo clone nsacyber/Control-Flow-Integrity

          • sshUrl

            git@github.com:nsacyber/Control-Flow-Integrity.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Reverse Engineering Libraries

            ghidra

            by NationalSecurityAgency

            radare2

            by radareorg

            ILSpy

            by icsharpcode

            bytecode-viewer

            by Konloch

            ImHex

            by WerWolv

            Try Top Libraries by nsacyber

            WALKOFF

            by nsacyberPython

            goSecure

            by nsacyberPython

            GRASSMARLIN

            by nsacyberJava

            Event-Forwarding-Guidance

            by nsacyberPowerShell