Overview
Thejira listattachments command enumerates file attachments across Jira projects and issues. This reconnaissance command is invaluable for identifying sensitive documents, discovering attachment IDs for subsequent download operations, filtering for specific file types, and mapping the document landscape of an organization’s Jira instance.
Syntax
Required Parameters
The base URL of the target Jira instance (e.g.,
https://company.atlassian.net)Optional Parameters
Authentication cookie (
cloud.session.token or tenant.session.token). Required for accessing non-public attachmentsProject key to list attachments from (e.g.,
PROJ, FIN, HR). If not specified with --all-projects, will list attachments across accessible projectsReturn all attachments for the specified project (not just the first 100). Automatically paginates through all results
Return attachments for all projects. WARNING: This can generate a large number of requests and significant data
Maximum number of attachments to return (when not using
--all)Comma-separated list of file extensions to include (e.g.,
pdf,docx,xlsx). Only attachments with these extensions will be returnedComma-separated list of file extensions to exclude (e.g.,
png,jpg,gif). Attachments with these extensions will be filtered outSave command output to a specified file
Examples
List Attachments in Specific Project
List the first 100 attachments in a project:Find All PDF and Excel Files
Search for potentially sensitive document types:Exclude Image Files
List all non-image attachments:Comprehensive Reconnaissance
List all attachments across all projects (high-volume operation):Target Configuration Files
Search for potentially sensitive configuration files:Find Executable Files
Identify uploaded executables or scripts:Use Cases
- Red Team
- Blue Team
Offensive Security Applications
- Sensitive Document Discovery: Identify financial reports, credentials, or confidential documents
- Download Planning: Obtain attachment IDs for subsequent download operations
- Configuration Harvesting: Find config files that may contain credentials or system information
- Source Code Discovery: Locate uploaded source code or scripts
- Credential Mining: Search for password files, key files, or credential documents
- Reconnaissance: Map organizational document structure and data classification practices
- Target Prioritization: Identify high-value attachments based on filenames and types
- Data Inventory: Create comprehensive list of available data for exfiltration planning
Output
The command returns detailed information about each attachment found:Output Information
For each issue containing attachments:- Issue Title: Summary of the parent issue
- Issue Key: Issue identifier (PROJECT-###)
- Issue Id: Numeric ID
- Status: Current workflow status
- Filename: Original filename as uploaded
- Attachment Id: Unique identifier (use with
jira download) - Mimetype: MIME type of the file
- File size: Size in bytes
Detection Considerations
Jira Audit Log Entries
This command generates the following audit log events:issue_viewed- May be logged for each issue accessed- Search/query operations may be logged
- Includes: User ID, query parameters, timestamp, IP address
Network Indicators
- HTTP GET requests to
/rest/api/3/search?jql=...&fields=attachment,summary,status - JQL queries containing
attachments IS NOT EMPTY - Multiple sequential requests when paginating through results (using
--all) - Query parameters indicating project filtering or extension filtering
OPSEC Considerations
Performance Considerations
--all-projectswith--allcan generate hundreds or thousands of API requests- Large result sets may take significant time to complete
- Network latency affects overall operation time
- Each project/page requires a separate API call
Filtering Behavior
--includeand--excludeare mutually exclusive concepts but both filter client-side- Filtering happens after retrieval, so all attachments are still requested from the API
- Extensions are case-insensitive
- Issues with zero attachments after filtering are removed from output
Related Commands
- jira download - Download attachments using IDs obtained from this command
- jira listprojects - List available projects to target for attachment enumeration
- jira listissues - List issues with their basic attachment information
- jira searchissues - Search for issues, optionally including attachment data
- jira attach - Upload new file attachments