Linux testing software: Starting from the source code

Source: Internet
Author: User

Nowadays, a large number of network servers are starting to use the Linux operating system, and the security of Linux servers is also getting more and more attention. Linux Server attacks are defined as: attacks are unauthorized actions designed to impede, damage, weaken, or damage the security of Linux servers, the attack range can be from denial of service to completely endangering and damaging the Linux server. There are many types of Linux Server attacks. From the perspective of attack depth, we can divide the attacks into four levels: DoS) the local user obtains the read and write permissions of unauthorized files, the remote user obtains the read and write permissions of privileged files, and the remote user obtains the root permission. Next, we will select some classic linux testing software-targeted tools to illustrate them one by one.


The most common defect in Linux is buffer overflow. A buffer may previously be defined as a continuous computer memory block containing instances of the same data type ". The most common buffer type is a simple character array. Overflow means that data is added out of the memory block allocated to the buffer. From this, we can see that, as an open-source system, code check in Linux is very important. For attackers and administrators, whoever attaches importance to it first takes the initiative to a certain extent.


(1) linux testing software SPIKE

SPIKE is a security testing tool written by Dave Aitel of immunitysec. SPIKE provides a variety of constructor functions. For example, s_binary can be used to construct binary data, s_string can be used to construct a string, and s_unistring can be used to construct a UNICODE string. Another advantage of SPIKE is Dave Aitel's Fuzz theory. It can construct special numbers or strings as program input and check whether the program can process the exception data. In addition, SPIKE provides common protocol support, such as sun rpc and ms rpc.


(2) linux testing software Lint

A list of some errors that Lint can check: Possible null pointers, this pointer is used after memory is released, assignment order problems, spelling errors, and so on. Generally, a C/C ++ compiler assumes that the program is correct, while Lint is the opposite. Therefore, it is better than the general check executed by the compiler. Lint can run through multiple files to perform error checking and code analysis. This is something the compiler cannot do. Popular Lint programs include: PC-lint is a commercial program provided by Gimpel Software that supports C/C ++; Splint (the original LCLint) it is a GNU Free Lint program, but only supports C and does not support C ++.
When running Lint, just like a normal compiler, you just need to add the makefile directly. You can control and calibrate the Lint output by configuring options and code annotations. For example, here is a function that returns a NULL pointer. Splint can be identified through the following comments/* @ null:
 

 
 
  1. /*@null@*/ void *test(void)  
  2. {  
  3. // a function that returns NULL!  
  4. return NULL;  


This has two purposes: to prevent Splint from alerting the function that returns the Null pointer for this function; To ensure that Splint checks that the return pointer of this function is valid in any code that calls this function.


(3) linux testing software Flawfinder

Flawfinder is a security audit tool for c and c ++ programs written in Python to check potential security risks. It searches for the source code of the file to obtain potential security vulnerabilities. It supports detecting databases and generating reports in HTML format.

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.