C ++ hosting program for security management

Source: Internet
Author: User

In C ++ programming languages, security operations on programs are also relatively simple. We can manage program security through C ++ hosting programs. So how can we implement this function correctly? Here we will introduce the concepts of C ++ hosting programs in detail.

  • Detailed Usage Guide for C ++ memory alignment
  • C ++ Memento pattern application rules
  • Analysis of C ++ assert () function Application Methods
  • C ++ kmp algorithm template code explanation
  • C ++ file copy application skills

Generally, C ++ hosting programs need to protect core algorithms and sensitive data.

1. Protect Core algorithms: use C ++ to develop components

2. Protection of sensitive data: use C ++ program + C ++ to host components, rather than simply using components

Why can't C ++ components be used to protect sensitive data?

Common sensitive data includes database connection strings and keys. If the data is communicated through component interfaces, it is easy for programmers to intercept the data through programming:

A. Authorization for components during design: Even if implemented, the interface information is easily obtained in The Decompilation tool. The attacker must have at least the runtime authorization.

B. The attacker can use the Ilasm tool to modify the registration CheckPoint.

Therefore, only codes that cannot be compiled are "secure". Currently, only C ++ hosting programs can have the advantages of both protection and development. The following describes the specific solution:

1. Idea: Call the C #. net component through the C ++ hosting program. The C ++ hosting program is used as the container, and the C #. net component is used as the application.

2. Implementation

A. Create a C ++ hosting component and create a C ++ class to receive sensitive data. Call the C #. net component.

B. Create a C ++ Win32 application and call the C ++ hosting component through Regasm

C. Create the C #. net Component: provides an interface for receiving sensitive data and opens the main application screen.

3. Key points: Connect C ++ and C # Through the C ++ hosting program #
All managed code can be decompiled. Only unmanaged C ++ Code cannot be decompiled)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.