[Journey] Development of a Blackhat Cloacker

xHolyy

Newbie
Joined
Jun 27, 2018
Messages
24
Reaction score
12
logo.png

As first, Hi to everyone!

I start this thread because I want to share my Journey about developing a own Blackhat Cloacker.
Since my 12th age (11 years back already) I am programming various of tools for my own, I was always active as affiliate marketeer but I used in the past different tools and some are really outdated.
So that's the reason I thought, I can develop them by my own right? So this will be my Journey about creating my own tool for it!

What are the tools that I use?
  • I am using Laravel PHP Framework
  • My code editor will be Atom
  • Im developing on Ubuntu 18.04 with a local lampp environment
  • My project will make use of Composer (to get all the needed JS/CSS sources)
  • I will use bootstrap 4 for the webpanel
What functions does the tool need (my own perspective):
  • 1. Functionality to add multiple domains/websites by DNS to the tool
  • 2. Functionality to track the visitors on the landingspages and making GEO located restrictions on it
  • 3. Functionality to add Affiliate Offers to it (So the Cookie URL will be known by the system)
  • 4. Functionality to create a landingspagebuilder for all offers (Seperated by domain, so every domain has his own affiliate offers, landingspage and statistics)
  • 5. Functionality to track own statistics to compare with the statistics of the Affiliate network
  • 6. Functionality to create a blogbuilder (Automatically creating blogposts with automatically indexing in Google)
  • 7. Functionality to automatically getting content without writing, so scraper is required with automated article rewriter + spinner.

What functions did I created already?
  • 1, The option to add a website/domain to the system
    Here under a code snippet about verifying the .TXT record that the user has to add to their DNS
    PHP:
     // Validate if txt exist $aRecords = dns_get_record($aWebsite->title, DNS_TXT);
    $key = [$aWebsite->confirm_hash];
    $aFilter = array_filter($aRecords, function ($arr) use ($key) {
    return in_array($arr['txt'], $key);
    });
    
    // Check if it hits a match
    if(sizeof($aFilter) > 0)
    {
    // Get basename without http and tld
    $pattern = '/\w+\..{2,3}(?:\..{2,3})?(?:$|(?=\/))/i';
    if (preg_match($pattern, $aWebsite->url, $matches) === 1)
    {
    $sSubdomain = stristr($matches[0], '.',true);
    }
    
    // Create subdomain in DirectAdmin
    $createSub = DirectAdmin::postSubdomains([
    'action' => 'create',
    'domain' => 'HIDDEN.nl',
    'subdomain' => $sSubdomain
    ]);
    
    if($createSub)
    {
    $aWebsite->verified = 1;
    $aWebsite->save();
    
    $array = [
    'errorMessage' => 'The domainname is succesfully confirmed, you can start using your resource',
    'color' => 'success'
    ];
    return redirect()->back()->with($array);
    }
    1610367594749.png


  • 2 + 5. To track visitors on the landingspages I need the users data to monetize it. So Im using a XML api request to get the visitors information by IP. (Full statistics under this graphs are some tables with all user info like GEO, Country, IP, Visit date, If they clicked a outbound button).
    PHP:
    $xml = simplexml_load_file("http://www.geoplugin.net/xml.gp?ip=". $ip);
    1610367997110.png


  • 3. Fully finished, you can hold as member specific Feed URL's adding including logo, description, outbound cookie URL & you can set it up as GEO/Device located.

  • 4. The landingspagebuilder is 1 of the biggest parts of the whole system and was taking a lot of time to create and improve to a excellent tool to build-up / edit them quickly and easily.
    Here under a demonstration in 2 animated GIF's how to create a landing and the preview of the landingspage
    Peek-2021-01-11-13-54.gif

    Peek-2021-01-11-13-5455.gif


    Code snippert for the landingbuilder



  • Blogbuilder currently under development
  • Article rewriter / scraper currently under development

  • I will make use of a Scaleserp API to get scraped content.
    Under here a snippet:

    PHP:
    // Results
          $aResults = $aJson['organic_results'];
    
          foreach($aResults as $aResult)
    
          {
    
            $aScrape = new Scrapers();
    
            $aScrape->fire_id = $aUrl->id;
    
            $aScrape->title = $aResult['title'];
    
            $aScrape->link  = $aResult['link'];
    
            $aScrape->snippet = $aResult['snippet'];
    
            $aScrape->save();
    
          }
    
    
    
    
    
          // Pagination
    
          $aApiPages = $aJson['pagination']['api_pagination']['other_pages'];
    
          // Directly push all other pages trough the API as well
    
          foreach($aApiPages as $key => $value)
    
          {
    
            $this->_runDifferentPage($aSettingList['scaleserp_api'], $aUrl, $key);
    
          }



    Updates for the last 2 points will be posted soon.





    If you got questions about this development, feel free to ask, If you got suggestions, Feel free to leave them down below.



    Thanks for following my Journey!

 
Hi, I got a really nice update for the blogbuilder!

This is what I fixed:
  • If a user his domain is verified he can create a blogbuilder. It will create automatically a domainname on the server trough DirectAdmin API.
  • Automatically a Database will be created in DirectAdmin and this credentials will be saved to the blogbuilder settings
  • A user can scrape his content now automatically trough SeoSERP with our API key build in
  • The blogbuilder will automatically seed all the blog posts that will be generated automatically to the wordpress blog
  • In the wordpress installation that the server will run is a built in detection for bots / users, If bots visit the pages/blog items it will be visisble otherwhise the user will be redirected to the attachted landingspage automtically without even seeing 0.1ms of the website.
Here you will find some snippets:
PHP:
public function toWordpress($iBlogsettingsId)
    {
      // Blog
      $aBlog = Blogbuilder::where('id', $iBlogsettingsId)->first();

      // Website
      $aWebsite = Website::where('id', $aBlog->website_id)->first();

      // Posts
      $aWhere = [
        'blog_id' => $aBlog->id,
        'active' => 0
      ];
      $aPosts = Blogposts::where($aWhere)->get();

      config(['database.connections.blogbuilder' => [
        'driver' => 'mysql',
        "host" => $aWebsite->blog_host,
        "database" => $aWebsite->blog_database,
        "username" => $aWebsite->blog_username,
        "password" => $aWebsite->blog_password,
        "port" => $aWebsite->blog_port,
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
        'strict'    => false
      ]]);
      $db = DB::connection('blogbuilder');

      // Insert in the other database
      foreach($aPosts as $aPost)
      {
         // Friendly url
         $slug = preg_replace('/[^A-Za-z0-9-]+/', '-', $aPost->title);

         // Insert
         $aInsert = $db->insert('insert into wp_posts (
           post_author, post_date, post_content, post_title, post_status, comment_status, ping_status, post_name, post_type)
           values (?, ?, ?, ?, ?, ?, ?, ?, ?)', [
             1, date('Y-m-d H:i:s'), $aPost->message, $aPost->title, 'publish', 'closed', 'open', $slug, 'post'
          ]);

          // Now set post on active
          $aPost->active = 1;
          $aPost->save();
        }

        return redirect()->back();
    }

See you at the new update!
 
Back
Top