{"id":13776056,"url":"https://github.com/bcoles/ssrf_proxy","last_synced_at":"2025-04-13T07:50:32.772Z","repository":{"id":37546055,"uuid":"43538049","full_name":"bcoles/ssrf_proxy","owner":"bcoles","description":"SSRF Proxy facilitates tunneling HTTP communications through servers vulnerable to Server-Side Request Forgery.","archived":false,"fork":false,"pushed_at":"2018-01-01T00:58:25.000Z","size":463,"stargazers_count":459,"open_issues_count":4,"forks_count":74,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T05:08:17.963Z","etag":null,"topics":["magic","proxy","ssrf","ssrf-proxy"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcoles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-02T06:01:19.000Z","updated_at":"2025-03-23T11:04:07.000Z","dependencies_parsed_at":"2022-08-02T02:20:04.643Z","dependency_job_id":null,"html_url":"https://github.com/bcoles/ssrf_proxy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoles%2Fssrf_proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoles%2Fssrf_proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoles%2Fssrf_proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoles%2Fssrf_proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcoles","download_url":"https://codeload.github.com/bcoles/ssrf_proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["magic","proxy","ssrf","ssrf-proxy"],"created_at":"2024-08-03T17:01:58.929Z","updated_at":"2025-04-13T07:50:32.743Z","avatar_url":"https://github.com/bcoles.png","language":"Ruby","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具","Ruby"],"sub_categories":["\u003ca id=\"ea4dfcd8f33ec1852180c6283b2c8516\"\u003e\u003c/a\u003e未分类"],"readme":"# SSRF Proxy\n\n\u003ca href=\"https://github.com/bcoles/ssrf_proxy\" target=\"_blank\"\u003e\n  \u003cimg alt=\"Version 0.0.4\" src=\"https://img.shields.io/badge/version-0.0.4-brightgreen.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/bcoles-ci/ssrf_proxy\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://api.travis-ci.org/bcoles-ci/ssrf_proxy.svg?branch=master\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.versioneye.com/ruby/ssrf_proxy/\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://img.shields.io/versioneye/d/ruby/ssrf_proxy.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://hakiri.io/github/bcoles-ci/ssrf_proxy/master/\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://hakiri.io/github/bcoles-ci/ssrf_proxy/master.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/bcoles/ssrf_proxy\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://codeclimate.com/github/bcoles/ssrf_proxy/badges/gpa.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/bcoles-ci/ssrf_proxy?branch=master\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://coveralls.io/repos/github/bcoles-ci/ssrf_proxy/badge.svg?branch=master\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://inch-ci.org/github/bcoles/ssrf_proxy\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://inch-ci.org/github/bcoles/ssrf_proxy.svg?branch=master\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/bcoles/ssrf_proxy/blob/master/LICENSE.md\" target=\"_blank\"\u003e\n  \u003cimg alt=\"MIT License\" src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\"/\u003e\n\u003c/a\u003e\n\n\n**SSRF Proxy** is a multi-threaded HTTP proxy server designed\nto tunnel client HTTP traffic through HTTP servers vulnerable\nto Server-Side Request Forgery (SSRF).\n\nOnce configured, SSRF Proxy attempts to format client HTTP\nrequests appropriately for the vulnerable server. Likewise,\nthe server's response is parsed and formatted for the client.\n\nBy correctly formatting the client request and stripping\nunwanted junk from the response it is possible to use\nSSRF Proxy as a HTTP proxy for web browsers, proxychains,\nand scanning tools such as sqlmap, nmap, dirb and nikto.\n\nSSRF Proxy also assists with leveraging blind SSRF\nvulnerabilities to perform time-based attacks, such\nas blind time-based SQL injection with sqlmap.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eVersion\u003c/th\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/bcoles/ssrf_proxy\" target=\"_blank\"\u003e\n        \u003cimg alt=\"Version 0.0.4\" src=\"https://img.shields.io/badge/version-0.0.4-brightgreen.svg\"/\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eGithub\u003c/th\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/bcoles/ssrf_proxy\"\u003ehttps://github.com/bcoles/ssrf_proxy\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eWiki\u003c/th\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/bcoles/ssrf_proxy/wiki\"\u003ehttps://github.com/bcoles/ssrf_proxy/wiki\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eDocumentation\u003c/th\u003e\n    \u003ctd\u003e\n      \u003ca href=\"http://www.rubydoc.info/github/bcoles/ssrf_proxy\" target=\"_blank\"\u003ehttp://www.rubydoc.info/github/bcoles/ssrf_proxy\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eAuthor\u003c/th\u003e\n    \u003ctd\u003eBrendan Coles\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eCopyright\u003c/th\u003e\n    \u003ctd\u003e2015-2017 Brendan Coles\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eLicense\u003c/th\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/bcoles/ssrf_proxy/blob/master/LICENSE.md\" target=\"_blank\"\u003e\n        \u003cimg alt=\"MIT License\" src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\"/\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Requirements\n\nRuby 2.2.2 or newer.\n\nRuby Gems:\n\n- celluloid-io\n- webrick\n- logger\n- colorize\n- ipaddress\n- base32\n- htmlentities\n- socksify\n- mimemagic\n\n## Installation\n\n```\n$ gem install ssrf_proxy\n```\n\n## Usage (command line)\n\n```\nUsage:   ssrf-proxy [options] -u \u003cSSRF URL\u003e\nExample: ssrf-proxy -u http://target/?url=xxURLxx\nOptions:\n\n   -h, --help             Help\n       --version          Display version\n\n  Output options:\n   -v, --verbose          Verbose output\n   -d, --debug            Debugging output\n       --no-color         Disable colored output\n\n  Server options:\n   -p, --port=PORT        Listen port (Default: 8081)\n       --interface=IP     Listen interface (Default: 127.0.0.1)\n\n  SSRF request options:\n   -u, --url=URL          Target URL vulnerable to SSRF.\n   -f, --file=FILE        Load HTTP request from a file.\n       --placeholder=STR  Placeholder indicating SSRF insertion point.\n                          (Default: xxURLxx)\n       --method=METHOD    HTTP method (GET/HEAD/DELETE/POST/PUT/OPTIONS)\n                          (Default: GET)\n       --post-data=DATA   HTTP post data\n       --cookie=COOKIE    HTTP cookies (separated by ';')\n       --user=USER[:PASS] HTTP basic authentication credentials.\n       --user-agent=AGENT HTTP user-agent (Default: none)\n       --rules=RULES      Rules for parsing client request\n                          (separated by ',') (Default: none)\n       --no-urlencode     Do not URL encode client request\n\n  SSRF connection options:\n       --ssl              Connect using SSL/TLS.\n       --proxy=PROXY      Use a proxy to connect to the server.\n                          (Supported proxies: http, https, socks)\n       --insecure         Skip server SSL certificate validation.\n       --timeout=SECONDS  Connection timeout in seconds (Default: 10)\n\n  HTTP response modification:\n       --match=REGEX      Regex to match response body content.\n                          (Default: \\A(.*)\\z)\n       --strip=HEADERS    Headers to remove from the response.\n                          (separated by ',') (Default: none)\n       --decode-html      Decode HTML entities in response body.\n       --unescape         Unescape special characters in response body.\n       --guess-status     Replaces response status code and message\n                          headers (determined by common strings in the\n                          response body, such as 404 Not Found.)\n       --guess-mime       Replaces response content-type header with the\n                          appropriate mime type (determined by the file\n                          extension of the requested resource.)\n       --sniff-mime       Replaces response content-type header with the\n                          appropriate mime type (determined by magic bytes\n                          in the response body.)\n       --timeout-ok       Replaces timeout HTTP status code 504 with 200.\n       --detect-headers   Replaces response headers if response headers\n                          are identified in the response body.\n       --fail-no-content  Return HTTP status 502 if the response body\n                          is empty.\n       --cors             Adds a 'Access-Control-Allow-Origin: *' header.\n\n  Client request modification:\n       --forward-method   Forward client request method.\n       --forward-headers  Forward all client request headers.\n       --forward-body     Forward client request body.\n       --forward-cookies  Forward client request cookies.\n       --cookies-to-uri   Add client request cookies to URI query string.\n       --body-to-uri      Add client request body to URI query string.\n       --auth-to-uri      Use client request basic authentication\n                          credentials in request URI.\n       --ip-encoding=MODE Encode client request host IP address.\n                          (Modes: int, ipv6, oct, hex, dotted_hex)\n       --cache-buster     Append a random value to the client request\n                          query string.\n\n```\n\n\n## Usage (ruby)\n\nLoad the ```ssrf_proxy``` library:\n\n```ruby\n  require 'ssrf_proxy'\n```\n\nInitialize the `SSRFProxy::HTTP` object:\n\n```ruby\n  # Initialize with a URL containing 'xxURLxx' placeholder\n  ssrf = SSRFProxy::HTTP.new(url: 'http://example.local/?url=xxURLxx')\n\n  # Or, provide the placeholder elsewhere in the request\n  ssrf = SSRFProxy::HTTP.new(url: 'http://example.local/', method: 'POST', post_data: 'xxURLxx')\n\n  # Alternatively, the object can be initialized\n  # with a file containing a raw HTTP request:\n  ssrf = SSRFProxy::HTTP.new(file: 'ssrf.txt')\n\n  # Or, initialized with a StringIO object containing a raw HTTP request:\n  http = StringIO.new(\"GET http://example.local/?url=xxURLxx HTTP/1.1\\n\\n\")\n  ssrf = SSRFProxy::HTTP.new(file: http)\n```\n\nRefer to the documentation for additional configuration options.\n\nOnce initialized, the `SSRFProxy::HTTP` object can be used to send HTTP\nrequests via the SSRF using the ```send_uri``` and ```send_request``` methods.\n\n```ruby\n  # GET via SSRF\n  ssrf.send_uri('http://127.0.0.1/')\n\n  # POST via SSRF\n  ssrf.send_uri('http://127.0.0.1/', method: 'POST', headers: {}, body: '')\n\n  # GET via SSRF (using a raw HTTP request)\n  ssrf.send_request(\"GET http://127.0.0.1/ HTTP/1.1\\n\\n\")\n```\n\nRefer to the documentation for additional request options.\n\n\n## Documentation\n\nRefer to the wiki for more information and example usage:\nhttps://github.com/bcoles/ssrf_proxy/wiki\n\nRefer to RubyDoc for code documentation:\nhttp://www.rubydoc.info/github/bcoles/ssrf_proxy\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoles%2Fssrf_proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcoles%2Fssrf_proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoles%2Fssrf_proxy/lists"}