Overview
Thejira attach command uploads a file as an attachment to an existing Jira issue. This command is useful for offensive operations involving payload delivery, file exfiltration staging, or social engineering scenarios where malicious files are disguised as legitimate business documents. Files are attached with customizable names and can be referenced in subsequent operations.
Syntax
Required Parameters
The base URL of the target Jira instance (e.g.,
https://company.atlassian.net)Path to the file to upload. Can be any file type (executables, documents, archives, etc.)
The issue key to attach the file to (e.g.,
PROJ-123)Optional Parameters
Authentication cookie (
cloud.session.token or tenant.session.token). Required for authenticated attachment uploadsCustom filename for the attachment. If not specified, defaults to the original filename. Useful for disguising file types or making files appear legitimate
Comment text associated with the uploaded file (currently defaults to “untitled”)
Additional text to add context to the attachment on the issue page (e.g., “I uploaded this file, please take a look”)
Attachment ID of an existing attachment to reference (if the attachment is already created)
Save command output to a specified file
Examples
Basic File Attachment
Attach a malicious executable disguised as a PDF:Social Engineering with Context
Upload a file with convincing context text:Macro-Enabled Document
Attach a weaponized Office document:Archive with Hidden Payload
Upload a compressed archive containing multiple files:Use Cases
- Red Team
- Blue Team
Offensive Security Applications
- Payload Delivery: Upload malicious executables, scripts, or documents to issues accessible by targets
- Social Engineering: Disguise malware as legitimate business files (reports, invoices, updates)
- Persistence: Host payloads on trusted infrastructure (Jira) to bypass web filtering
- Credential Harvesting: Upload files that prompt for credentials when opened
- Phishing: Combine with
addcommentto create convincing scenarios for file execution - Data Staging: Upload files as a staging area for lateral movement or exfiltration
- Watering Hole: Plant malicious files in frequently accessed issues
Output
The command returns the attachment ID upon successful upload. If a file with the same name already exists, it will notify the user. Example successful output:Output Information
- Filename: The name of the uploaded file (as it appears in Jira)
- Attachment Id: Unique identifier for the attachment (use with
jira downloadcommand) - The file becomes immediately accessible to anyone with view permissions on the issue
Detection Considerations
Jira Audit Log Entries
This command generates the following audit log events:issue_attachment_created- Records the file upload- Includes: User ID, issue key, filename, file size, timestamp, IP address
Network Indicators
- HTTP POST requests to
/rest/api/3/issue/{issueKey}/attachments - Large HTTP POST body sizes corresponding to file uploads
- Content-Type: multipart/form-data headers
OPSEC Considerations
Upload Limitations
- Jira instances may have maximum file size limits (typically 10-100 MB)
- Some file types may be blocked by organizational policies
- Files may be scanned by integrated security tools upon upload
- Duplicate filenames are detected and rejected
Cookie Considerations
- Authentication required for file uploads (anonymous uploads typically not permitted)
- Session cookies can be extracted from user browsers using tools like SharpChrome
- Cookie validity should be verified before large file uploads
Related Commands
- jira addcomment - Add comments referencing the attached file for social engineering
- jira listattachments - List attachments to verify upload or find existing files
- jira download - Download attachments by their attachment ID
- jira createissue - Create a new issue to host the attachment
- jira listissues - Find appropriate issues for file attachments