CVE-2023-34758: Github.com/bishopfox/sliver Silver Vulnerable To MitM Attack Vulnerability

CRITICAL
Advisory Identifier: GHSA-8jxm-xp43-qh3q
CVSS 8.1
CWE-327
Published
Advisory Summary

CVE-2023-34758 is a CRITICAL (CVSS 8.1) silver vulnerable to mitm attack vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Github.com/bishopfox/sliver libraries in the Go ecosystem. The issue involves silver vulnerable to mitm attack against implants due to a cryptography vulnerability. Remediation is available by upgrading affected packages to version 1.5.40.

CVE-2023-34758 at a Glance

CVE Identifier CVE-2023-34758
GHSA Identifier GHSA-8jxm-xp43-qh3q
Severity CRITICAL
CVSS v3.1 Base Score 8.1
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Github.com/bishopfox/sliver
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-34758

To remediate this vulnerability, upgrade all affected Github.com/bishopfox/sliver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/bishopfox/sliver fixed: 1.5.40
Upgrade github.com/bishopfox/sliver to 1.5.40
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/bishopfox/sliver

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-34758, inspect your project dependencies for Github.com/bishopfox/sliver:

inspect dependencies for github.com/bishopfox/sliver

Analyze the terminal output to locate any version of Github.com/bishopfox/sliver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.40), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Github.com/bishopfox/sliver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The current cryptography implementation in Sliver up to version 1.5.39 allows a MitM with access to the corresponding implant binary to execute arbitrary codes on implanted devices via intercepted and crafted responses. (Reserved CVE ID: CVE-2023-34758) ### Details Please see [the PoC repo](https://github.com/tangent65536/Slivjacker). ### PoC Please also see [the PoC repo](https://github.com/tangent65536/Slivjacker). To setup a simple PoC environment, 1. Generate an implant with its C2 set to the PoC server's address and copy the embedded private implant key and public server key into the config json. 2. Run the implant on a separate VM and a `notepad.exe` window should pop up on the implanted VM. ### Impact A successful attack grants the attacker permission to execute arbitrary code on the implanted device. ### References https://github.com/BishopFox/sliver/blob/master/implant/sliver/cryptography/implant.go https://github.com/BishopFox/sliver/blob/master/implant/sliver/cryptography/crypto.go https://github.com/tangent65536/Slivjacker ### Credits [Ting-Wei Hsieh](https://github.com/tangent65536) from [CHT Security Co. Ltd.](https://www.chtsecurity.com/?lang=en)

CVE-2023-34758 Affected Github.com/bishopfox/sliver Versions

1 component(s)
Fixed Versions:
1.5.40
Product / Package Ecosystem Affected Versions Fixed Version
github.com/bishopfox/sliver
Go
≥ 1.5.0
< 1.5.40
1.5.40

References

Frequently Asked Questions

What is CVE-2023-34758?
CVE-2023-34758 is a security vulnerability in Github.com/bishopfox/sliver involving Silver vulnerable to MitM attack against implants due to a cryptography vulnerability under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Github.com/bishopfox/sliver versions are affected?
Affected versions include releases prior to 1.5.40 across affected packages: github.com/bishopfox/sliver.
What version fixes CVE-2023-34758?
Upgrading to 1.5.40 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/bishopfox/sliver affected?
Yes, github.com/bishopfox/sliver is affected in releases prior to 1.5.40. Upgrade your dependency to 1.5.40 or later.
What is the CVSS score of CVE-2023-34758?
CVE-2023-34758 has a CVSS v3.1 base score of 8.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-34758?
CVE-2023-34758 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Go dependencies for CVE-2023-34758?
Run the dependency tree command: 'inspect dependencies for github.com/bishopfox/sliver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8jxm-xp43-qh3q",
  "modified" : "2024-11-18T16:26:30Z",
  "published" : "2023-06-21T22:08:34Z",
  "aliases" : [ "CVE-2023-34758" ],
  "summary" : "Silver vulnerable to MitM attack against implants due to a cryptography vulnerability",
  "details" : "### Summary\nThe current cryptography implementation in Sliver up to version 1.5.39 allows a MitM with access to the corresponding implant binary to execute arbitrary codes on implanted devices via intercepted and crafted responses. (Reserved CVE ID: CVE-2023-34758)\n\n### Details\nPlease see [the PoC repo](https://github.com/tangent65536/Slivjacker).\n\n### PoC\nPlease also see [the PoC repo](https://github.com/tangent65536/Slivjacker).\nTo setup a simple PoC environment,  \n 1. Generate an implant with its C2 set to the PoC server's address and copy the embedded private implant key and public server key into the config json.  \n 2. Run the implant on a separate VM and a `notepad.exe` window should pop up on the implanted VM.  \n\n### Impact\nA successful attack grants the attacker permission to execute arbitrary code on the implanted device.  \n  \n### References\nhttps://github.com/BishopFox/sliver/blob/master/implant/sliver/cryptography/implant.go  \nhttps://github.com/BishopFox/sliver/blob/master/implant/sliver/cryptography/crypto.go  \nhttps://github.com/tangent65536/Slivjacker  \n\n### Credits\n[Ting-Wei Hsieh](https://github.com/tangent65536) from [CHT Security Co. Ltd.](https://www.chtsecurity.com/?lang=en)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/bishopfox/sliver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.40"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/BishopFox/sliver/security/advisories/GHSA-8jxm-xp43-qh3q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34758"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35170"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/BishopFox/sliver/commit/2d1ea6192cac2ff9d6450b2d96043fdbf8561516"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/BishopFox/sliver"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/BishopFox/sliver/blob/master/implant/sliver/cryptography/crypto.go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/BishopFox/sliver/blob/master/implant/sliver/cryptography/implant.go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/BishopFox/sliver/releases/tag/v1.5.40"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tangent65536/Slivjacker"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2023-1866"
  }, {
    "type" : "WEB",
    "url" : "https://www.chtsecurity.com/news/04f41dcc-1851-463c-93bc-551323ad8091"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-21T22:08:34Z",
    "nvd_published_at" : "2023-06-26T20:15:10Z"
  }
}