[*] Binary protection state of ecmh
RELRO CANARY NX PIE RPATH RUNPATH SYMBOLS
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_0040142c_0040142c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
5 - signal(param_1,FUN_0040142c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401448_00401448.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - memset(acStack_48,0,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401448_00401448.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - inet_ntop(10,param_3,acStack_48,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402710_00402710.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
42 - memcpy((void *)((int)&local_50 + iVar2),param_5,param_6 & 0xffff)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402710_00402710.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
73 - memcpy(auStack_44,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401f3c_00401f3c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
10 - g_conf = (undefined4 *)malloc(0x88)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401f3c_00401f3c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - g_conf = (undefined4 *)malloc(0x88); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401f3c_00401f3c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
16 - memset(g_conf,0,0x88)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
29 - __s = (undefined1 *)malloc(uVar7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
40 - memcpy(__s + 8,param_1 + 0xd,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
172 - memcpy(puVar10 + 4,__src,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
190 - memcpy(__s2,piVar8,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
25 - memset(local_60,0,0x48)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
30 - memcpy(auStack_58,param_1 + 0xd,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
31 - memcpy(auStack_48,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
41 - memcpy(auStack_28,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403fe8_00403fe8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
41 - memset(local_34,0,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403fe8_00403fe8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
42 - memset(auStack_6c,0,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403fe8_00403fe8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
70 - inet_ntop(10,pbVar5,local_34,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
25 - signal(param_1,(__sighandler_t)0x1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
36 - ftruncate(iVar1,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
43 - inet_ntop(10,pvVar4,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
64 - inet_ntop(10,pvVar4,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
98 - inet_ntop(10,puVar7 + 0xd,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
100 - inet_ntop(10,puVar7 + 0x11,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
161 - signal(param_1,FUN_004014fc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
30 - memset(local_78,0,0x5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
34 - memcpy(auStack_70,param_1 + 0xd,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
47 - memcpy(auStack_40,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
56 - memcpy(auStack_2c,param_3,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
36 - __stream = fopen("/proc/net/if_inet6","r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
47 - pcVar9 = fgets(acStack_128,0x100,__stream)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
55 - &local_178,&local_174,&local_170,&local_16c,acStack_158)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
94 - memset(auStack_148,0,0x20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
95 - memcpy(auStack_148,param_1 + 1,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
123 - memcpy(piVar8 + 0xd,&local_168,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
128 - memcpy(piVar8 + 0x11,&local_168,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
134 - sVar1 = (short)piVar8[9]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00405608_00405608.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
35 - sVar4 = recvfrom(*(int *)(g_conf + 0x40),param_1,*(size_t *)(g_conf + 0x3c),0,&local_2c,&local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004053e0_004053e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
21 - cVar2 = *(char *)(param_2 + 6)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004053e0_004053e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
30 - cVar2 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004053e0_004053e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
33 - cVar2 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404e0c_00404e0c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
68 - cVar5 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404e0c_00404e0c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
71 - cVar5 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
25 - memset(local_630,0,0x60c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
31 - memcpy(auStack_628,param_1 + 0x11,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
32 - memcpy(auStack_618,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
36 - param_6 = 0x5dc
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
38 - memcpy(auStack_604,param_5,param_6)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/dolog_00406590.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
Issue description:
The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead to buffer overflows, denial of service, or data representation problems.
30 - vprintf(param_2,&local_res8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/cleanpid_0040668c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
6 - unlink("/var/run/ecmh.pid")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/list_new_0040649c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - puVar1 = (undefined4 *)malloc(0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/list_new_0040649c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - puVar1 = (undefined4 *)malloc(0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/listnode_add_00406404.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - puVar1 = (undefined4 *)malloc(0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/listnode_add_00406404.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
9 - puVar1 = (undefined4 *)malloc(0xc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/savepid_004066ec.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __stream = fopen("/var/run/ecmh.pid","w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004064f0_004064f0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
10 - __stream = fopen("/var/run/ecmh.pid","r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004064f0_004064f0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
13 - fscanf(__stream,"%d",local_10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004064f0_004064f0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-scanf
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
13 - fscanf(__stream,"%d",local_10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/grpint_create_004074b4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - puVar1 = (undefined4 *)malloc(8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/grpint_create_004074b4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - puVar1 = (undefined4 *)malloc(8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __s = malloc(0x28)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __s = malloc(0x28); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(__s,0,0x28)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - memcpy(__s,param_1,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/subscr_create_004076a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __dest = (undefined4 *)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/subscr_create_004076a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __dest = (undefined4 *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/subscr_create_004076a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
16 - memcpy(__dest,param_1,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
22 - pvVar1 = realloc(*(void **)(g_conf + 8),uVar7 * 0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
Issue description:
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
22 - pvVar1 = realloc(*(void **)(g_conf + 8),uVar7 * 0x90); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
22 - pvVar1 = realloc(*(void **)(g_conf + 8),uVar7 * 0x90); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
43 - memset(__s,0,0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
46 - memset(auStack_60,0,0x20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
56 - memcpy(auStack_60,__ifname,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
62 - memcpy(__s + 9,local_50,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
65 - memset(acStack_40,0,0x20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
66 - strncpy(acStack_40,(char *)__ifname,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
66 - strncpy(acStack_40,(char *)__ifname,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
Issue description:
If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.
66 - strncpy(acStack_40,(char *)__ifname,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
33 - iVar4 = getopt_long(param_1,param_2,"fi:d:pPu:vV12",&PTR_s_foreground_0041a014,local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
79 - pcVar9 = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
117 - pcVar9 = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
121 - _Var5 = fork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
132 - freopen("/dev/null","r",_stdin)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
134 - signal(1,FUN_0040142c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
135 - signal(0xf,cleanpid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
136 - signal(2,cleanpid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
137 - signal(9,cleanpid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
138 - signal(0xe,(__sighandler_t)&LAB_004013ec)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
140 - signal(0x10,FUN_004014fc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
141 - signal(0x11,(__sighandler_t)&LAB_004039e8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
164 - pFVar6 = fopen("/var/run/ecmh.dump","w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
175 - pvVar7 = malloc(*(size_t *)((int)pvVar10 + 0x3c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
175 - pvVar7 = malloc(*(size_t *)((int)pvVar10 + 0x3c)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
200 - setuid(__uid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-setuid-seteuid
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. If the program calls a function to drop privileges but does not check the return code to ensure that privileges were successfully dropped, then the program will continue to operate with the higher privileges.
200 - setuid(__uid); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
203 - setgid(__gid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
212 - signal(0xe,(__sighandler_t)&LAB_004013ec)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_0040142c_0040142c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
5 - signal(param_1,FUN_0040142c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401448_00401448.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - memset(acStack_48,0,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401448_00401448.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - inet_ntop(10,param_3,acStack_48,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
25 - signal(param_1,(__sighandler_t)0x1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
36 - ftruncate(iVar1,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
43 - inet_ntop(10,pvVar4,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
64 - inet_ntop(10,pvVar4,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
98 - inet_ntop(10,puVar7 + 0xd,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
100 - inet_ntop(10,puVar7 + 0x11,acStack_70,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004014fc_004014fc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
161 - signal(param_1,FUN_004014fc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401f3c_00401f3c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
10 - g_conf = (undefined4 *)malloc(0x88)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401f3c_00401f3c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - g_conf = (undefined4 *)malloc(0x88); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00401f3c_00401f3c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
16 - memset(g_conf,0,0x88)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
36 - __stream = fopen("/proc/net/if_inet6","r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
47 - pcVar9 = fgets(acStack_128,0x100,__stream)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
55 - &local_178,&local_174,&local_170,&local_16c,acStack_158)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
94 - memset(auStack_148,0,0x20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
95 - memcpy(auStack_148,param_1 + 1,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
123 - memcpy(piVar8 + 0xd,&local_168,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
128 - memcpy(piVar8 + 0x11,&local_168,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402080_00402080.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
134 - sVar1 = (short)piVar8[9]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402710_00402710.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
42 - memcpy((void *)((int)&local_50 + iVar2),param_5,param_6 & 0xffff)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00402710_00402710.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
73 - memcpy(auStack_44,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
29 - __s = (undefined1 *)malloc(uVar7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
40 - memcpy(__s + 8,param_1 + 0xd,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
172 - memcpy(puVar10 + 4,__src,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403168_00403168.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
190 - memcpy(__s2,piVar8,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
25 - memset(local_60,0,0x48)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
30 - memcpy(auStack_58,param_1 + 0xd,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
31 - memcpy(auStack_48,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403a80_00403a80.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
41 - memcpy(auStack_28,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403fe8_00403fe8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
41 - memset(local_34,0,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403fe8_00403fe8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
42 - memset(auStack_6c,0,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00403fe8_00403fe8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
70 - inet_ntop(10,pbVar5,local_34,0x2e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
30 - memset(local_78,0,0x5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
34 - memcpy(auStack_70,param_1 + 0xd,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
47 - memcpy(auStack_40,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004044e0_004044e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
56 - memcpy(auStack_2c,param_3,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
25 - memset(local_630,0,0x60c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
31 - memcpy(auStack_628,param_1 + 0x11,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
32 - memcpy(auStack_618,param_2,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
36 - param_6 = 0x5dc
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404c14_00404c14.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
38 - memcpy(auStack_604,param_5,param_6)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404e0c_00404e0c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
68 - cVar5 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00404e0c_00404e0c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
71 - cVar5 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004053e0_004053e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
21 - cVar2 = *(char *)(param_2 + 6)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004053e0_004053e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
30 - cVar2 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004053e0_004053e0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
33 - cVar2 = *(char *)(param_2 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00405608_00405608.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
35 - sVar4 = recvfrom(*(int *)(g_conf + 0x40),param_1,*(size_t *)(g_conf + 0x3c),0,&local_2c,&local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004064f0_004064f0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
10 - __stream = fopen("/var/run/ecmh.pid","r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004064f0_004064f0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
13 - fscanf(__stream,"%d",local_10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_004064f0_004064f0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-scanf
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
13 - fscanf(__stream,"%d",local_10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __s = malloc(0x28)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __s = malloc(0x28); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(__s,0,0x28)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/FUN_00407040_00407040.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - memcpy(__s,param_1,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/cleanpid_0040668c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
6 - unlink("/var/run/ecmh.pid")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/dolog_00406590.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
Issue description:
The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead to buffer overflows, denial of service, or data representation problems.
30 - vprintf(param_2,&local_res8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/grpint_create_004074b4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - puVar1 = (undefined4 *)malloc(8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/grpint_create_004074b4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - puVar1 = (undefined4 *)malloc(8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
22 - pvVar1 = realloc(*(void **)(g_conf + 8),uVar7 * 0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
Issue description:
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
22 - pvVar1 = realloc(*(void **)(g_conf + 8),uVar7 * 0x90); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
22 - pvVar1 = realloc(*(void **)(g_conf + 8),uVar7 * 0x90); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
43 - memset(__s,0,0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
46 - memset(auStack_60,0,0x20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
56 - memcpy(auStack_60,__ifname,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
62 - memcpy(__s + 9,local_50,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
65 - memset(acStack_40,0,0x20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
66 - strncpy(acStack_40,(char *)__ifname,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
66 - strncpy(acStack_40,(char *)__ifname,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/int_create_004069c4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
Issue description:
If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.
66 - strncpy(acStack_40,(char *)__ifname,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/list_new_0040649c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - puVar1 = (undefined4 *)malloc(0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/list_new_0040649c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - puVar1 = (undefined4 *)malloc(0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/listnode_add_00406404.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - puVar1 = (undefined4 *)malloc(0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/listnode_add_00406404.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
9 - puVar1 = (undefined4 *)malloc(0xc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
33 - iVar4 = getopt_long(param_1,param_2,"fi:d:pPu:vV12",&PTR_s_foreground_0041a014,local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
79 - pcVar9 = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
117 - pcVar9 = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
121 - _Var5 = fork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
132 - freopen("/dev/null","r",_stdin)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
134 - signal(1,FUN_0040142c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
135 - signal(0xf,cleanpid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
136 - signal(2,cleanpid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
137 - signal(9,cleanpid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
138 - signal(0xe,(__sighandler_t)&LAB_004013ec)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
140 - signal(0x10,FUN_004014fc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
141 - signal(0x11,(__sighandler_t)&LAB_004039e8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
164 - pFVar6 = fopen("/var/run/ecmh.dump","w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
175 - pvVar7 = malloc(*(size_t *)((int)pvVar10 + 0x3c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
175 - pvVar7 = malloc(*(size_t *)((int)pvVar10 + 0x3c)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
200 - setuid(__uid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-setuid-seteuid
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. If the program calls a function to drop privileges but does not check the return code to ensure that privileges were successfully dropped, then the program will continue to operate with the higher privileges.
200 - setuid(__uid); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
203 - setgid(__gid)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/main_00405804.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
212 - signal(0xe,(__sighandler_t)&LAB_004013ec)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/savepid_004066ec.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __stream = fopen("/var/run/ecmh.pid","w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/subscr_create_004076a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __dest = (undefined4 *)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/subscr_create_004076a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __dest = (undefined4 *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_ecmh/subscr_create_004076a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
16 - memcpy(__dest,param_1,0x10)