Skip to content

IDAPython script to check ELF & PE/COFF for MS SDL banned.h policy violations and set breakpoints.

Notifications You must be signed in to change notification settings

msimon96/banned_functions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

banned_functions

IDAPython script to check ELF & PE/COFF for MS SDL banned.h policy violations and set breakpoints. Microsoft no longer maintains the banned.h header file, but it contains a good list of antiquated problematic functions:

bannedList = (["_fstrcat", "_fstrcpy", "_fstrncat", "_fstrncpy", "_ftccat", "_ftccpy", "_ftcscat", "_ftcscpy", "_getts", "_gettws", "_getws", "_itoa", "_i64toa", "_i64tow", "_mbccpy", "_mbscpy", "_mbsnbcpy", "_mbsnbcat", "_mbsncat", "_mbsncpy", "_mbstok", "_snprintf", "_sntprintf", "_sntscanf", "_snwprintf", "_splitpath", "_stprintf", "_stscanf", "_tccat", "_tccpy", "_tcscat", "_tcscpy", "_tcsncat", "_tcsncpy", "_tmakepath", "_tscanf", "_tsplitpath", "_ui64toa", "_ui64tow", "_ultoa", "CharToOemA", "CharToOemBuffA", "CharToOemBuffW", "CharToOemW", "OemToCharA", "OemToCharBuffA", "OemToCharBuffW", "OemToCharW", "StrCat", "StrCatA", "StrCatBuff", "StrCatBuffA", "StrCatBuffW", "StrCatChainW", "StrCatN", "StrCatNA", "StrCatNW", "StrCatW", "StrCpy", "StrCpyA", "StrCpyN", "StrCpyNA", "StrCpyNW", "strcpyW", "StrCpyW", "StrNCat", "StrNCatA", "StrNCatW", "StrNCpy", "StrNCpyA", "StrNCpyW", "gets", "lstrcat", "lstrcatA", "lstrcatn", "lstrcatnA", "lstrcatnW", "lstrcatW", "lstrcpy", "lstrcpyA", "lstrcpyn", "lstrcpynA", "lstrcpynW", "lstrcpyW", "lstrlen", "lstrlenA", "lstrlenW", "scanf", "sscanf", "snscanf", "snwscanf", "sprintf", "sprintfA", "sprintfW", "lstrncat", "makepath", "nsprintf", "strcat", "strcatA", "strcatW", "strcpy", "strcpyA", "strncat", "strncpy", "swprintf", "ualstrcpyW", "vsnprintf", "vsprintf", "vswprintf", "wcscat", "wcscpy", "wcsncat", "wcsncpy", "wnsprintf", "wnsprintfA", "wsprintf", "wsprintfA", "wsprintfW", "wmemcpy", "wscanf", "wnsprintfW", "ExAllocatePool", "ExAllocatePoolWithTag", "ExAllocatePoolWithQuota", "ExAllocatePoolWithQuotaTag", "ExAllocatePoolWithTagPriority", "MmMapIoSpace", "MmAllocateContiguousMemorySpecifyCache", "ExInitializeNPagedLookasideList", "MmAllocateContiguousMemorySpecifyCache"])

This version was tested on Python 3.7.4 as Python 3.8 wasn't supported with IDAPython at the time the script was ported.

About

IDAPython script to check ELF & PE/COFF for MS SDL banned.h policy violations and set breakpoints.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%