Click here to Skip to main content
15,891,721 members
Articles / Desktop Programming / MFC

Driver to Hide Processes and Files

, ,
Rate me:
Please Sign up or sign in to vote.
4.57/5 (145 votes)
17 Aug 2009CPOL12 min read 658.5K   28.6K   369  
In this article, we describe the driver we created to hide processes and files in a system.
// 
// This file defines site configuration.
//
//

// compatibility section

#define _STLP_DRIVERSTUDIO_NO_THROW
#define _STLP_NO_EXCEPTIONS
#define _STLP_NO_NATIVE_MBSTATE_T
#define _STLP_NO_CSTD_FUNCTION_IMPORTS
#define _STLP_NO_IOSTREAMS
#define _STLP_NO_OWN_NAMESPACE        // required for AMD64
#define _STLP_GLOBAL_NEW_HANDLER
#define _STLP_USE_STATIC_LIB
#define _NOTHREADS 
#define _STLP_USE_NEWALLOC
#define _STLP_USE_RAW_SGI_ALLOCATORS 

#ifdef _IA64_
#define _STLP_NESTED_TYPE_PARAM_BUG
#endif

// compatibility section

# if defined (_STLP_NO_IOSTREAMS) || defined (_STLP_NO_NEW_IOSTREAMS) && ! defined ( _STLP_NO_OWN_IOSTREAMS )
#  define _STLP_NO_OWN_IOSTREAMS
# endif

# if !defined (_STLP_NO_OWN_IOSTREAMS) &&  ! defined (_STLP_OWN_IOSTREAMS)
#  define _STLP_OWN_IOSTREAMS
# endif

# if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS))
#  if ! defined (_NOTHREADS)
#   define _NOTHREADS
#  endif
#  if ! defined (_STLP_NO_THREADS)
#   define _STLP_NO_THREADS
#  endif
# endif

/* 
 * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library.
 * NOTE : please do that only if you know what you are doing !
 * Changing default will require you to change makefile in "src" accordingly
 * and to rebuild STLPort library !
 * On UNIX, this has no effect. 
 *
 */
// # define _STLP_USE_DYNAMIC_LIB

/*
 * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library.
 * NOTE : please do that only if you know what you are doing !
 * Changing default will require you to change makefile in "src" accordingly
 * and to rebuild STLPort library !
 * On UNIX, this has no effect. 
 *
 */
// # define _STLP_USE_STATIC_LIB


/* 
 * Edit relative path below (or put full path) to get native 
 * compiler vendor's headers included. Default is "../include"
 * Hint : never install STLport in the directory that ends with "include"
 */
// #  undef _STLP_NATIVE_INCLUDE_PATH
// #  define _STLP_NATIVE_INCLUDE_PATH ../include
// same for C library headers like <cstring>
// #  undef _STLP_NATIVE_CPP_C_INCLUDE_PATH
// #  define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
// same for C headers like <string.h>
// #  undef _STLP_NATIVE_C_INCLUDE_PATH
// #  define _STLP_NATIVE_C_INCLUDE_PATH ../include


/* 
 * _STLP_USE_OWN_NAMESPACE/_STLP_NO_OWN_NAMESPACE
 * If defined, STLport uses _STL:: namespace, else std::
 * The reason you have to use separate namespace in wrapper mode is that new-style IO
 * compiled library may have its own idea about STL stuff (string, vector, etc.),
 * so redefining them in the same namespace would break ODR and may cause
 * undefined behaviour. Rule of thumb is - if new-style iostreams are
 * available, there WILL be a conflict. Otherwise you should be OK.
 * In STLport iostreams mode, there is no need for this flag other than to facilitate
 * link with third-part libraries compiled with different standard library implementation.
 */
// #  define _STLP_USE_OWN_NAMESPACE 1
// #  define _STLP_NO_OWN_NAMESPACE  1


/* 
 * Uncomment _STLP_USE_NEWALLOC to force allocator<T> to use plain "new"
 * instead of STLport optimized node allocator engine.
 */
// #define   _STLP_USE_NEWALLOC   1

/* 
 * Uncomment _STLP_USE_MALLOC to force allocator<T> to use plain "malloc" 
 * instead of STLport optimized node allocator engine.
 */
// #define   _STLP_USE_MALLOC 1

/*
 * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging,
 * such as padding/checking for memory consistency 
 */
// #define   _STLP_DEBUG_ALLOC 1


/*
 * Uncomment this to force all debug diagnostic to be directed through a
 * user-defined global function:
 *	void __stl_debug_message(const char * format_str, ...)
 * instead of predefined STLport routine. 
 * This allows you to take control of debug message output.
 * Default routine calls fprintf(stderr,...)
 * Note : If you set this macro, you must supply __stl_debug_message 
 * function definition somewhere.
 */
//#define _STLP_DEBUG_MESSAGE 1

/*
 * Uncomment this to force all failed assertions to be executed through
 * user-defined global function:
 *	void __stl_debug_terminate(void). This allows
 * you to take control of assertion behaviour for debugging purposes.
 * Default routine throws unique exception if _STLP_USE_EXCEPTIONS is set,
 * calls _STLP_ABORT() otherwise.
 * Note : If you set this macro, you must supply __stl_debug_terminate 
 * function definition somewhere.
 */
//#define _STLP_DEBUG_TERMINATE 1

/*
 * Comment this out to enable throwing exceptions from default __stl_debug_terminate()
 * instead of calling _STLP_ABORT().
 */
#define   _STLP_NO_DEBUG_EXCEPTIONS 1

/* 
 * Uncomment that to disable exception handling code 
 */
// #define   _STLP_NO_EXCEPTIONS 1

/*
 * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace
 * stlport:: or std::, even if the compiler supports namespaces
 */

// #define   _STLP_NO_NAMESPACES 1

//==========================================================
// Compatibility section
//==========================================================

/* 
 * Use abbreviated class names for linker benefit (don't affect interface).
 * This option is obsolete, but should work in this release.
 *
 */
// # define _STLP_USE_ABBREVS

/* 
 * This definition precludes STLport reverse_iterator to be compatible with
 * other parts of MSVC library. (With partial specialization, it just
 * has no effect).
 * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly
 */
// #    define _STLP_NO_MSVC50_COMPATIBILITY 1

/*
 * _STLP_USE_RAW_SGI_ALLOCATORS is a hook so that users can disable use of
 * allocator<T> as default parameter for containers, and use SGI
 * raw allocators as default ones, without having to edit library headers.
 * Use of this macro is strongly discouraged.
 */
// #define   _STLP_USE_RAW_SGI_ALLOCATORS 1

/*
 * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type()
 * for querying iterator properties. Please note those names are non-standard and are not guaranteed
 * to be used by every implementation. However, this setting is on by default when partial specialization
 * is not implemented in the compiler and cannot be sumulated (only if _STLP_NO_ANACHRONISMS is not set). 
 * Use of those interfaces for user-defined iterators is strongly discouraged: 
 * please use public inheritance from iterator<> template to achieve desired effect. 
 * Second form is to disable old-style queries in any case.
 */
// # define _STLP_USE_OLD_HP_ITERATOR_QUERIES
// # define _STLP_NO_OLD_HP_ITERATOR_QUERIES


//==========================================================================

// This section contains swithes which should be off by default,
// but so few compilers would have it undefined, so that we set them here,
// with the option to be turned off later in compiler-specific file

# define _STLP_INCOMPLETE_EXCEPTION_HEADER

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer Apriorit Inc.
United States United States
ApriorIT is a software research and development company specializing in cybersecurity and data management technology engineering. We work for a broad range of clients from Fortune 500 technology leaders to small innovative startups building unique solutions.

As Apriorit offers integrated research&development services for the software projects in such areas as endpoint security, network security, data security, embedded Systems, and virtualization, we have strong kernel and driver development skills, huge system programming expertise, and are reals fans of research projects.

Our specialty is reverse engineering, we apply it for security testing and security-related projects.

A separate department of Apriorit works on large-scale business SaaS solutions, handling tasks from business analysis, data architecture design, and web development to performance optimization and DevOps.

Official site: https://www.apriorit.com
Clutch profile: https://clutch.co/profile/apriorit
This is a Organisation

33 members

Written By
Software Developer Codedgers Inc
Ukraine Ukraine
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Written By
Software Developer (Junior) ApriorIT
Ukraine Ukraine
Sergey Popenko.
22 years old.
The Driver Team`s software developer.
Master of the Applied Math faculty, the Dnipropetrovsk National University, Ukraine.

Comments and Discussions