Skip to content

How to transfer files in AWS using SSM #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlospolop
Copy link
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Exfiltration and Internal Service Access via AWS SSM Port Forwarding

This blog post details a method to exfiltrate files and access internal services on AWS EC2 instances via AWS Systems Manager (SSM) port forwarding, without requiring any inbound network changes.

Prerequisites

  • AWS CLI installed and configured (via AWS SSO or static keys)
  • Appropriate SSM IAM permissions on the target instance (e.g., AmazonSSMManagedInstanceCore)
  • ...

    🔧 Technical Details

    SSM Port Forwarding: Abuse the AWS-StartPortForwardingSession SSM document via the AWS CLI, specifying portNumber and localPortNumber, to create a bidirectional TCP tunnel through the SSM agent without opening inbound firewall ports.

    Python HTTP Server Exfiltration: Serve arbitrary files on the EC2 instance by running python3 -m http.server <port>, then retrieve them locally over the established SSM tunnel wi...

    🤖 Agent Actions

    Added new practical SSM port-forwarding techniques (file exfiltration, internal service access, 7z encryption, defensive controls) to the existing AWS EC2/EBS/SSM/VPC post-exploitation page and included a reference to the Pentest Partners blog.

    ✅ Review Checklist

    • Content is technically accurate
    • Formatting follows HackTricks style guidelines
    • Links and references are working
    • Content adds educational value
    • No sensitive information is exposed

    This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

@carlospolop
Copy link
Collaborator Author

🔗 Additional Context

Original Blog Post: https://www.pentestpartners.com/security-blog/how-to-transfer-files-in-aws-using-ssm/

Content Categories: Based on the analysis, this content was categorized under "pentesting-cloud/aws-ssm-port-forwarding.md".

Repository Maintenance:

  • MD Files Formatting: 520 files processed

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant