{"id":19504806,"url":"https://github.com/nice-digital/pinglogger","last_synced_at":"2025-02-25T22:12:58.439Z","repository":{"id":82014666,"uuid":"206055519","full_name":"nice-digital/PingLogger","owner":"nice-digital","description":"Log details of every request to Kibana to find the root cause of 'external service interactions'","archived":false,"fork":false,"pushed_at":"2019-09-03T11:36:34.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-08T10:45:30.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/nice-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-03T10:54:53.000Z","updated_at":"2019-09-03T11:36:36.000Z","dependencies_parsed_at":"2024-07-23T05:07:40.336Z","dependency_job_id":null,"html_url":"https://github.com/nice-digital/PingLogger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2FPingLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2FPingLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2FPingLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2FPingLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/PingLogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240754366,"owners_count":19852189,"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":[],"created_at":"2024-11-10T22:27:18.042Z","updated_at":"2025-02-25T22:12:58.380Z","avatar_url":"https://github.com/nice-digital.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PingLogger\n  \n \u003e Log details of every request to Kibana to find the root cause of 'external service interactions'\n \n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTable of contents\u003c/strong\u003e\u003c/summary\u003e\n\u003c!-- START doctoc --\u003e\n- [PingLogger](#pinglogger)\n  - [What is it?](#what-is-it)\n    - [External service interactions](#external-service-interactions)\n  - [Stack](#stack)\n  - [Set up](#set-up)\n  - [Usage](#usage)\n\u003c!-- END doctoc --\u003e\n\u003c/details\u003e\n  \n## What is it?\n\nPingLogger is a small web app that logs details of every request to Kibana. Its aim is to allow us to diagnose 'external service interaction' vulnerabilities that have been raised in pen tests, and identify where they are coming from.\n\nThe idea is to deploy it to an internal only URL (for example ping-logger.nice.org.uk or similar). This URL can then be used in a request header (e.g. *X-Forwarded-For* or *Host*) where there's an external service interaction vulnerability, which in turn should trigger a log of that request to Kibana.\n\n\u003e Note: there's no automated build or deployment for this project and it's not permanently running, as it's only needed on demand to diagnose these issues. So speak to Ops if you need it for testing.\n\n### External service interactions\n\nBy passing an arbitrary domain name in a header (e.g. *X-Forwarded-For* or *Host*) in a request, it can be possible to induce an application to perform a server-side DNS lookup or HTTP request to the specified domain. This won't necessarily be a vulnerability in its own right, but could leak extra information (e.g. internal IP addresses etc) to the given URL which could then be used maliciously. This could be used for a Server-Side Request Forgery (SSRF) attack.\n\nA further explanation, from [portswigger](https://portswigger.net/kb/issues/00300200_external-service-interaction-dns):\n\n\u003e External service interaction arises when it is possible to induce an application to interact with an arbitrary external service, such as a web or mail server. The ability to trigger arbitrary external service interactions does not constitute a vulnerability in its own right, and in some cases might even be the intended behavior of the application. However, in many cases, it can indicate a vulnerability with serious consequences.\n  \n## Stack\n\n- Visual Studio 2017+\n- ASP.NET Core 2.1\n- NICE Logging\n- Serilog\n  \n## Set up\n\n1. Clone with Git and open *src/PingLogger.sln* in Visual Studio 2017+\n2. Edit user secrets to put in logging configuration values\n   1. You can find these from the *Logging* variable set in Octo or from another private project with NICE Logging configured.\n3. Make sure the internal NICE NuGet feed is configured as a package source in Visual Studio\n4. Build the solution, which restores packages\n5. Run the application and you'll see details of each request appear in Kibana.\n\n\u003e Note: this is a public repository, which means we don't store any real config in appsettings.json. Instead, all config on dev machines is managed via secrets.json.\n\n## Usage\n\nGet it deployed to a URL (e.g. ping-logger.nice.org.uk), via Ops. Then use that URL in a request header (e.g. *X-Forwarded-For* or *Host*), for example:\n\n```\nGET /some-url HTTP/1.1\nHost: www.nice.org.uk\nUser-Agent: Whatever/1.2.3\nX-Forwarded-For: ping-logger.nice.org.uk\n```\n\nIf the given URL is pinged, you'll see details of the request in Kibana","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fpinglogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fpinglogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fpinglogger/lists"}