Spectra Assure
Community
Docs
warningRisk: Secrets
Scanned: 3 days ago

brainstem

Artifact:
latest
Top 10k
Acroname BrainStem Software Control Package
License: unknown
Published: 23 days ago



SAFE Assessment

Compliance

Licenses
No license compliance issues
Secrets
44 debugging symbols found

Security

Vulnerabilities
No known vulnerabilities detected
Hardening
6 hardening effectiveness issues

Threats

Tampering
No evidence of software tampering
Malware
No evidence of malware inclusion

Popularity

3.35M
Total Downloads
Contributor
Declared Dependencies
3
Dependents

Top issues

Problem

Operating systems execute application code in multiple privilege access levels. Separation of privileges is designed to protect the stability and integrity of the operating system by shielding it from issues that the user run applications may cause. However, some users may need to interact with higher privilege parts of the operating system to accomplish specific tasks. For this purpose, operating systems provide facilities that users may leverage to temporarily elevate their running privileges. Users with higher privileges can run any application with the same privilege level as their own. Attackers often try to trick privileged users into running malicious code, enabling them to infect the operating system. While the presence of code that elevates user privileges does not necessarily imply malicious intent, all of its uses in a software package should be documented and approved. Only select applications should consider using functions that can elevate user privileges. One example of acceptable use for such functions is allowing the users to install software packages and updates.

Prevalence in PyPI community

1 packages
found in
Top 100
17 packages
found in
Top 1k
111 packages
found in
Top 10k
2407 packages
in community

Next steps

Investigate reported detections as indicators of software tampering.
Consult Mitre ATT&CK documentation: T1548 - Abuse Elevation Control Mechanism.
Consider rewriting the flagged code without using the marked behaviors.

Problem

Security Development Lifecycle (SDL) is a group of enhanced compile-time checks that report common coding mistakes as errors, preventing them from reaching production. These checks minimize the number of security issues by enforcing strict memory access checks. They also prevent the use of hard-to-secure string and memory manipulation functions. To prove the binary has been compiled with these checks enabled, the compiler emits a special debug object. Removing the debug table eliminates this proof. Therefore, this check only applies to binaries that still have their debug tables.

Prevalence in PyPI community

6 packages
found in
Top 100
47 packages
found in
Top 1k
246 packages
found in
Top 10k
6306 packages
in community

Next steps

You should keep the debug table to prove that the SDL process has been followed.
To enable these checks, refer to your programming language toolchain documentation.
In Microsoft VisualStudio, you can enable this feature by setting the compiler option /SDL to ON.

Problem

Security Development Lifecycle (SDL) is a group of enhanced compile-time checks that report common coding mistakes as errors. These checks prevent the use of hard-to-secure memory manipulation functions. They enforce static memory access checks, and allow only the use of range-verified memory access functions. While these checks do not prevent every memory corruption issue by themselves, they do help reduce the likelihood.

Prevalence in PyPI community

2 packages
found in
Top 100
39 packages
found in
Top 1k
189 packages
found in
Top 10k
4600 packages
in community

Next steps

It's highly recommended to enable these checks for all software components used at security boundaries, or those that process user controlled inputs.
To enable these checks, refer to your programming language toolchain documentation.
In Microsoft VisualStudio, you can enable this feature by setting the compiler option /SDL to ON.

Problem

Buffer overrun protection on Linux is achieved in two ways. The most common solution is to use the stack canary (also called cookie). The stack canary is a special value written onto the stack that allows the operating system to detect and terminate the program if a stack overrun occurs. In most cases, compilers will apply the stack canary conservatively in order to avoid a negative performance impact. Therefore, stack canaries are often used together with another stack overrun mitigation - fortified functions. Fortified functions are usually wrappers around standard glibc functions (such as memcpy) which perform boundary checks either at compile time or run time to determine if a memory violation has occurred. The compiler needs additional context to generate such calls (for example, array size that needs to be known at compile time). Because of this, the compiler will virtually never substitute all viable functions with their fortified counterparts in complex programs. However, when combined with the stack canary, fortified functions provide a good measure of buffer overrun protection.

Prevalence in PyPI community

13 packages
found in
Top 100
74 packages
found in
Top 1k
456 packages
found in
Top 10k
7612 packages
in community

Next steps

Presence of unfortified string functions may indicate use of unsafe programming practices, and you should avoid it if possible.
In GCC, enable fortified functions with -fstack-protector and -D_FORTIFY_SOURCE=2 flag, while using at least -O1 optimization level.

Problem

Buffer overrun protection on Linux is achieved in two ways. The most common solution is to use the stack canary (also called cookie). The stack canary is a special value written onto the stack that allows the operating system to detect and terminate the program if a stack overrun occurs. In most cases, compilers will apply the stack canary conservatively in order to avoid a negative performance impact. Therefore, stack canaries are often used together with another stack overrun mitigation - fortified functions. Fortified functions are usually wrappers around standard glibc functions (such as memcpy) which perform boundary checks either at compile time or run time to determine if a memory violation has occurred. The compiler needs additional context to generate such calls (for example, array size that needs to be known at compile time). Because of this, the compiler will virtually never substitute all viable functions with their fortified counterparts in complex programs. However, when combined with the stack canary, fortified functions provide a good measure of buffer overrun protection.

Prevalence in PyPI community

18 packages
found in
Top 100
112 packages
found in
Top 1k
646 packages
found in
Top 10k
13062 packages
in community

Next steps

Presence of unfortified memory functions may indicate use of unsafe programming practices, and you should avoid it if possible.
In GCC, enable fortified functions with -fstack-protector and -D_FORTIFY_SOURCE=2 flag, while using at least -O1 optimization level.

Top behaviors

Prevalence in PyPI community

Behavior often found in this community (Common)
10 packages
found in
Top 100
50 packages
found in
Top 1k
265 packages
found in
Top 10k
5875 packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
11 packages
found in
Top 100
73 packages
found in
Top 1k
368 packages
found in
Top 10k
8619 packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
3 packages
found in
Top 100
32 packages
found in
Top 1k
197 packages
found in
Top 10k
4489 packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
75 packages
found in
Top 100
451 packages
found in
Top 1k
3488 packages
found in
Top 10k
109392 packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
34 packages
found in
Top 100
169 packages
found in
Top 1k
1256 packages
found in
Top 10k
55955 packages
in community

Top vulnerabilities

No vulnerabilities found.