[deepweb / tor network] How to install Tor and create Tor hidden service on Windows

Where to download Tor for Windows

If you need a browser with Tor, that is, if you are sufficient that you can have another IP when surfing the Internet or want to bypass regional restriction, then you need Tor Browser, download it from the official site. There already is everything you need for anonymous surfing in the web and everything is already set up.

If you want to install Tor as a service on Windows, then you need Expert Bundle. It can be downloaded from the same page of the official website. Next we will talk only about the Expert Bundle.

From the downloaded archive (in my case, the file is called tor-win32-0.3.3.7.zip), unpack the Tor folder to the root of drive C.

How to launch Tor on Windows

Tor can be started once, or set as NT service, which will be launched each time your computer booting. Consider a one-time launch. Open the Windows command prompt, to do this, press Win+x and select "Windows PowerShell (Administrator)" there.

In the window that opens, type

1
C:\Tor\tor.exe

Wait until Tor completes his business:

01.jpg

 

 

Tor already works! But it will end if you close the window. For Tor to work constantly, it needs to be installed as a service.

Installing Tor as a Windows Service

To install the service, simply run the command:

1
C:\Tor\tor.exe --service install

You can adjust the service using various Tor command-line options.

We need a configuration file, so create it in the C:\Tor\, directory, this file should be named torrc:

1
echo( > C:\Tor\torrc

To check if the service with the settings file starts (it does not contain errors), you can use this command:

1
C:\Tor\tor.exe -f "C:\Tor\torrc"

Now install the Tor service, which will read the settings from the C:\Tor\torrc file:

1
C:\Tor\tor.exe --service install -options -f "C:\Tor\torrc"

Remember that you must specify options after the -options flag, otherwise they will be ignored.

To start and stop the service, use the following commands:

1
2
C:\Tor\tor.exe --service start
C:\Tor\tor.exe --service stop

To remove the service:

1
2
C:\Tor\tor.exe --service stop
C:\Tor\tor.exe --service remove

Note that you must first stop the service and then delete it.

By default, the Tor service listens on port 9050, so you can check whether it is started by a command that shows if port 9050 is listened:

1
netstat -aon | findstr ":9050"

You can also use the following command:

1
2
cmd
for /f "tokens=1,2,3,4,5*" %i in ('netstat -aon ^| findstr ":9050" ^| findstr /i listening') do echo %j %l & @tasklist | findstr %m

02.jpg

 

 

Now, when the Tor service is installed and running, several recipes will be shown, how it can be used.

Using Tor in Windows to download files from blocked sites

Some sites with media content allow you to view it, but do not allow you to download files to your hard drive. An example of such a YouTube site. I consider YouTube just as an example of a web site, which can be censored in some regions. So image YouTube is blocked, so you can visit it using Tor Browser, but you cannot download video because your download program does not use Tor and, so, cannot access it.

I will show you the example of JDownloader (free, open source, supports a huge number of web sites and file sharing sources, cross-platform), but this instruction is suitable for any such programs if they support SOCKS5 or SOCKS4. JDownloader site, direct link to download the JDownloader installer.

In JDownloader, go to Settings, then the Connection Manager tab, and click the Add button. Replace the type with Socks5, in the Host/Port field, type localhost and 9050:

03.jpg

 

 

Click OK to save the settings and close the window.

JDownloader rotates the connection. Therefore, if you download from a blocked site, then uncheck the box Without proxy:

04.jpg

 

 

Now you can download from blocked sites!

How to create Tor hidden service in Windows

The essence of the hidden service is that on your computer (it can be a rented VPS or your home computer) running a web server. Your computer must have access to the Tor network. Through this network, anyone who has the address of your hidden service (domain name *.onion) can visit your website, which serves your web server. You do not need to worry about buying a domain name (it's free), about DNS, public IP, etc. - Tor network will take care of this. To start a hidden service, you only need two things:

  • running web server
  • connection to the Tor network

By the way, you might be interested in the article ‘How to get a beautiful domain name for the Tor hidden service.’

We need to have a working web server. To configure it, refer to the guide ‘How to install web server on Windows 10 (Apache 2.4, PHP 7, MySQL 8.0 and phpMyAdmin)’.

Now that the web server is installed and its functionality is verified, we will begin to configure the hidden service in Windows.

Your site for the hidden service should already work and open with localhost. I will create a simple web page. In the folder C:\Server\data\htdocs\ I create a new hidden folder, and in it the index.htm file with the following contents:

1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<html>
    <head>
        <title>Работает!</title>
        <meta charset="UTF-8">
    </head>
    <body>
        <div>
        Скрытый сервис работает!
        </div>
    </body>
</html>

Therefore, this file is accessible from the local server at http://localhost/hidden/:

05.jpg

 

 

Now open the Apache configuration file C:\Server\bin\Apache24\conf\httpd.conf and add it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Listen 127.0.0.1:9475
  
<VirtualHost 127.0.0.1:9475>
        DocumentRoot "C:/Server/data/htdocs/hidden/"
        ServerName localhost
        ServerAdmin you@example.com
     
<Directory />
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
Require all granted
</Directory>
    
</VirtualHost>

Basically, you just need to edit in it only the line DocumentRoot "C:/Server/data/htdocs/hidden/" - it shows the path to your website, which will be the Tor hidden service.

Restart the Apache web server for the changes to take effect:

1
c:\Server\bin\Apache24\bin\httpd.exe -k restart

Now your site for the hidden service should be accessible from the local computer at http://localhost:9475

06.jpg

 

 

Now go to the Tor configuration.

Open any C:\Tor\torrc file with any text editor and copy into it:

1
2
HiddenServiceDir "C:/Tor/hidden_service/"
HiddenServicePort 80 127.0.0.1:9475

Notice how we wrote C:\Tor\hidden_service\ - instead of \ we use /. You also need to use quotation marks.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

Restart the Tor service:

1
2
C:\Tor\tor.exe --service stop
C:\Tor\tor.exe --service start

The hidden_service folder will be automatically created and two files in it. In the file C:\Tor\hidden_service\hostname you will see the domain name for your hidden service:

07.jpg

 

 

In my case it is 77pam5zhvzu5jhst.onion, we try to open it in the Tor Browser:

08.jpg

 

 

It may take several minutes for the hidden service to open in the browser.

If you generated your own name for the Tor hidden service, replace the contents of the hostname and private_key file, and then restart the Tor service for the changes to take effect:

09.jpg

 

 

Using Tor browsers in Windows

If you want to surf anonymously on the Internet, we recommend using the Tor browser. It not only redirects traffic through the Tor network, but also has a number of patches and settings that promote privacy.

Nevertheless, if you want to access the Internet through the Tor network using browsers Google Chrome, Firefox, Opera or Internet Explorer, then it is also possible.

The Tor service must be installed (or started as shown at the beginning of the article).

Browsers Google Chrome, Opera and Internet Explorer use the same settings. Therefore, the changes will be applied immediately for all three browsers. In any of them, go to the Proxy settings, the following window will open:

10.jpg

 

 

In the window, click Network Setup. In the new window that opens, check the box ‘Use proxy server for local connections…’:

11.jpg

 

 

The "Advanced" button becomes active, press it. In the Socks field, type 127.0.0.1, and in the Port field, type 9050:

12.jpg

 

 

Click OK in all windows to save the settings. The current IP can, for example, be checked on the page https://suip.biz/?act=myip:

13.jpg

 

 

To change the settings in Firefox go to Settings -> Advanced -> Network -> Configure. In the window that appears, select the Manual proxy server setup switch. In the SOCKS Node field, enter 127.0.0.1 and the Port field is 9050. Put the switch on SOCKS 5. Click OK to save the settings.

14.jpg

 

 

System-wide proxy settings in Windows

Windows has a WinHTTP proxy program. It allows you to set proxy settings for the system as a whole. Logically, it is expected that all applications should use system-wide settings, but this does not happen. Windows uses WinHTTP for certain services, for example, to download Windows updates and perform checks on revoked certificates. Nevertheless, perhaps you will find an application for this.

Using the command

1
netsh winhttp import proxy source=ie

you can import settings from Internet Explorer.

And the following commands you can view/reset the use of system-wide settings:

1
2
netsh winhttp show proxy
netsh winhttp reset proxy

Accessing the Tor from a PHP program

If you installed the Tor service and you have the web server to set up the hidden service, you can also receive data from the Tor network in your PHP program (using cURL). Example of working code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
$url = 'http://hacktoolseqoqaqn.onion/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, "http://127.0.0.1:9050/");
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_PROXYTYPE, 7);
$output = curl_exec($ch);
$curl_error = curl_error($ch);
curl_close($ch);
  
print_r($output);
print_r($curl_error);

Continue reading: ‘How to set up proxy with Tor in Windows’.

Related articles:

[출처] https://miloserdov.org/?p=1839

 

 

 

 

 

 

 

 

 

 

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
공지 침투테스트(취약점검점검, 모의해킹) 문의 / 답변 졸리운_곰 2017.12.10 28361
92 [보안뉴스] 당신 폰을 훤히 들여다본다... ‘백도어 해킹’의 신무기 스파이칩 file 졸리운_곰 2023.03.26 78
91 [보안뉴스] 전 세계에서 가장 흔한 20개의 비밀번호는 무엇? file 졸리운_곰 2022.11.29 99
90 [보안뉴스] 디지털 바이러스, 그놈이 다시 창궐한다 file 졸리운_곰 2022.03.13 105
89 [보안뉴스] “해결 방법 없다” 구글이 본 제로클릭 공격의 위험 file 졸리운_곰 2022.01.19 132
88 [보안뉴스] 멕시코서 1200억 턴 北해커, 한국 계좌로 송금...누구에게? file 졸리운_곰 2021.02.19 175
87 [단독]”남한 은행 모조리 털어라” 돈줄 마른 북한, 이런 해킹팀까지 file 졸리운_곰 2021.02.12 140
86 "저쪽 애들에게 당했어" 北해킹에 10년 베테랑 기자도 낚였다 file 졸리운_곰 2020.07.05 210
85 北 3개 해킹조직, 亞서 6800억원 규모 암호화폐 탈취 file 졸리운_곰 2020.02.09 156
84 일본 호텔에 근무하는 로봇들, 몰카로 변신시킬 수 있다 file 졸리운_곰 2019.10.25 271
83 [주말판] 프라이버시 침해가 판치는 인터넷에서 살아남기 file 졸리운_곰 2019.01.20 175
82 "애플·아마존 서버에 중국 스파이칩… 한국도 안전 장담 못해" file 졸리운_곰 2018.10.06 207
81 1사분기의 디도스 공격, 숨으려 하지 않았다 file 졸리운_곰 2018.07.06 222
80 갠드크랩 랜섬웨어, 국내 피해 갈수록 확산 file 졸리운_곰 2018.04.22 233
79 [김민석의 Mr. 밀리터리] 가공할 북한 사이버 공격력, 한국은 기능부전 file 졸리운_곰 2018.02.23 270
78 대북제재로 더 과감해지는 北 해킹…美 "전세계가 해킹 표적" file 졸리운_곰 2018.02.21 182
77 인텔 CPU 보안패치 업데이트 했더니 더 심각한 오류가… file 졸리운_곰 2018.01.23 225
76 핵티비스트들이 가장 선호하는 취약점 두 개는? file 졸리운_곰 2018.01.23 245
75 [카드뉴스] 온라인 게임 사기 예방수칙 5 file 졸리운_곰 2018.01.07 196
74 앱 보안 취약한 원인은 오픈소스와 코드양 때문 file 졸리운_곰 2018.01.04 293
73 [카드뉴스] 오늘의 가상화폐 이슈 모아보기 file 졸리운_곰 2017.12.10 136
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED