Wednesday, August 21, 2024

Setup Arch Linux with COSMIC DE as KVM Guest

Per https://wiki.archlinux.org/title/COSMIC 

   COSMIC is a desktop environment developed in the Rust programming language, using the iced cross platform GUI library for Rust, and Smithay as building blocks for its compositor, cosmic-comp. Cosmic-comp is comparable to smithay's own anvil compositor demonstration, just like the Wayland project uses Weston as demo compositor.

In general we follow http://lxer.com/module/newswire/view/344680/index.html with following notice :-

3D acceleration is required for KVM guest. So tune virt-manager for deployment as follows



























When done perform setup KVM Hypervisior in COSMIC DE on Arch Linux Virtual machine



























Switching to another wallpaper in COSMIC DE














Monday, August 12, 2024

Setting Up and Using SpoofDPI

Brief description Firefox Proxy setup to work via SpoofDPI daemon been started in terminal session. Tested on Arch Linux and Fedora 40 WKS . Per https://github.com/xvzc/SpoofDPI

HTTPS  (CASE)

Although TLS encrypts every handshake process, the domain names are still shown as plaintext in the Client hello packet. In other words, when someone else looks on the packet, they can easily guess where the packet is headed to. The domain name can offer a significant information while DPI is being processed, and we can actually see that the connection is blocked right after sending Client hello packet. "XVZC" had tried some ways to bypass this, and found out that it seemed like only the first chunk gets inspected when we send the Client hello packet splited in chunks. What SpoofDPI does to bypass this is to send the first 1 byte of a request to the server, and then send the rest.

See also https://innovirtuoso.com/blog/introducing-spoofdpi-bypassing-deep-packet-inspection-through-a-github-repository/#introducing-spoofdpi-a-solution-to-bypass-dpi


SpoofDPI will be installed in ~/.spoof-dpi/bin. To run SpoofDPI in any directory, add the line below to your ~/.bashrc || ~/.zshrc || ...

export PATH=$PATH:~/.spoof-dpi/bin

# macOS Intel
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64

# macOS Apple Silicon
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-arm64

# linux-amd64
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-amd64

# linux-arm
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-arm

# linux-arm64
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-arm64

# linux-mips
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-mips

# linux-mipsle
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-mipsle

Go

You can also install SpoofDPI with go install

$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest

Git

You can also build your own

$ git clone https://github.com/xvzc/SpoofDPI.git
$ cd SpoofDPI
$ go build ./cmd/...

Usage

Usage: spoof-dpi [options...]
  -addr string
        listen address (default "127.0.0.1")
  -debug
        enable debug output
  -dns-addr string
        dns address (default "8.8.8.8")
  -dns-port int
        port number for dns (default 53)
  -enable-doh
        enable 'dns-over-https'
  -no-banner
        disable banner
  -pattern value
        bypass DPI only on packets matching this regex pattern; can be given multiple times
  -port int
        port (default 8080)
  -system-proxy
        enable system-wide proxy (default true)
  -timeout int
        timeout in milliseconds; no timeout when not given
  -v    print spoof-dpi's version; this may contain some other relevant information
  -window-size int
        chunk size, in number of bytes, for fragmented client hello,
        try lower values if the default value doesn't bypass the DPI;
        when not given, the client hello packet will be sent in two parts:
        fragmentation for the first data packet and the rest

If you are using any vpn extensions such as Hotspot Shield in Chrome browser, go to Settings > Extensions, and disable them.

OSX

Run spoof-dpi and it will automatically set your proxy

Linux

Run spoof-dpi and open your favorite browser with proxy option

google-chrome --proxy-server="http://127.0.0.1:8080"

Through these steps, users can strategically set up and utilize SpoofDPI, harnessing its potential to navigate networks monitored by DPI technology effortlessly.

First run

> ~/.spoofdpi/bin/spoofdpi &!

Second

Firefox HTTPS proxy should be tuned this way to put SpoofDPI in work


















Configuration SpoofDPI as service

boris@fedora:~$ systemctl --user status spoofdpi.service

● spoofdpi.service - Script Daemon For Test User Services

     Loaded: loaded (/etc/xdg/systemd/user/spoofdpi.service; enabled; preset: disabled)

    Drop-In: /usr/lib/systemd/user/service.d

             └─10-timeout-abort.conf

     Active: active (running) since Thu 2024-08-15 12:49:22 UTC; 19s ago

   Main PID: 2455 (spoof-dpi)

      Tasks: 8 (limit: 38308)

     Memory: 8.3M (peak: 9.4M)

        CPU: 13ms

     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/spoofdpi.service

             └─2455 /home/boris/.spoofdpi/bin/spoofdpi


Aug 15 12:49:22 fedora systemd[2419]: Started spoofdpi.service - Script Daemon For Test User Ser>

boris@fedora:~$ netstat -antp|grep 8080

(Not all processes could be identified, non-owned process info

 will not be shown, you would have to be root to see it all.)

tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      2455/spoof-dpi      

boris@fedora:~$ cat spoofdpi.service

[Unit]

Description=Script Daemon For Test User Services

[Service]

Type=simple

#User=

#Group=

ExecStart=/home/boris/.spoofdpi/bin/spoofdpi

Restart=on-failure

StandardOutput=file:%h/log_file

[Install]

WantedBy=default.target

Next step:

$ sudo cp spoofdpi.service  /etc/systemd/user/

systemctl --user daemon-reload

systemctl --user start spoofdpi.service

$ systemctl --user enable spoofdpi.service


~$ netstat -antp | grep 8080
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      10225/spoof-dpi     
tcp        0      0 127.0.0.1:8080          127.0.0.1:36142         ESTABLISHED 10225/spoof-dpi     
tcp        0      0 127.0.0.1:47444         127.0.0.1:8080          ESTABLISHED 3772/firefox        
tcp        0      0 127.0.0.1:44516         127.0.0.1:8080          ESTABLISHED 3772/firefox        
tcp        0      0 127.0.0.1:36142         127.0.0.1:8080          ESTABLISHED 3772/firefox        
tcp        0      0 127.0.0.1:51218         127.0.0.1:8080          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:51936         127.0.0.1:8080          ESTABLISHED 3772/firefox        
tcp        0      0 127.0.0.1:8080          127.0.0.1:49382         ESTABLISHED 10225/spoof-dpi     
tcp        0      0 127.0.0.1:8080          127.0.0.1:47444         ESTABLISHED 10225/spoof-dpi     
tcp        0      0 127.0.0.1:8080          127.0.0.1:51936         ESTABLISHED 10225/spoof-dpi     
tcp        0      0 127.0.0.1:49382         127.0.0.1:8080          ESTABLISHED 3772/firefox        
tcp        0      0 127.0.0.1:8080          127.0.0.1:44516         ESTABLISHED 10225/spoof-dpi  
   
*******************************
UPDATE as of 09/08/24
********************
 Also notice that Gnome DE allows to setup system wide  Network HTTPS Proxy along with spoofdpi.service. It provides an option to avoid tuning proxy setup inside Web Browsers



































Saturday, August 10, 2024

Install Arch Hyprland with ML4W Dotfiles 2.9 on Manjaro Unstable as second DE

UPDATE as of 08/12/24  Reproduced on bare metal








































END UPDATE

Deployed via repos  (1) and (2) 

https://github.com/mylinuxforwork/hyprland-starter   (1)

The ML4W Hyprland Starter - The perfect starting point for your Hyprland experiments. Easy to install, simple to configure.

https://github.com/mylinuxforwork/dotfiles   (2)

Dotfiles

on GitHub page https://github.com/mylinuxforwork

The ML4W Dotfiles for Hyprland - An advanced and full-featured configuration for the dynamic tiling window manager Hyprland including an easy to use installation script for Arch based Linux distrib…





















































Virt-Manager configuration for mentioned deployment





























Saturday, August 3, 2024

Bypass DPI on Linux

UPDATE as of 08/06/24  Bypass DPI on Arch Hyprland

Deployed via https://github.com/mylinuxforwork/dotfiles

https://dbaxps.blogspot.com/2024/08/bypass-dpi-on-arch-hyprland.html

END UPDATE

Following below is an implementation of some DPI bypass methods.The program is a local SOCKS proxy server.

A SOCKS proxy is a tool that allows you to route your internet traffic through a remote server, providing you with anonymity and the ability to bypass restrictions. It acts as a mediator between your device and the websites or services you want to access. When you send a request to access a website, the request is first sent to the SOCKS proxy server.

The proxy server then forwards your request to the website on your behalf, using the SOCKS protocol. This protocol enables the proxy server to establish a TCP connection with the website and pass the data between the two. By using a SOCKS proxy, your real IP address is hidden, and your network traffic appears to be originating from the proxy server, enhancing your online privacy. Additionally, they support various authentication methods, ensuring secure communication between your device and the proxy server.

Download zip-arcihve from https://github.com/hufrea/byedpi


Usage example:
ciadpi --disorder 1 --auto=torst --tlsrec 1+s
ciadpi --fake -1 --ttl 8












boris@fedora:~/Downloads$ unzip byedpi-main.zip

Archive:  byedpi-main.zip

6325488e028604e2f967f750055c570eeac00dac

   creating: byedpi-main/

 extracting: byedpi-main/.gitignore  

  inflating: byedpi-main/Makefile    

  inflating: byedpi-main/conev.c     

  inflating: byedpi-main/conev.h     

  inflating: byedpi-main/desync.c    

  inflating: byedpi-main/desync.h    

   creating: byedpi-main/dist/

   creating: byedpi-main/dist/windows/

  inflating: byedpi-main/dist/windows/byedpi.bat  

  inflating: byedpi-main/dist/windows/service_delete.bat  

  inflating: byedpi-main/dist/windows/service_install.bat  

  inflating: byedpi-main/dist/windows/service_restart.bat  

  inflating: byedpi-main/error.h     

  inflating: byedpi-main/extend.c    

  inflating: byedpi-main/extend.h    

  inflating: byedpi-main/kavl.h      

  inflating: byedpi-main/main.c      

  inflating: byedpi-main/mpool.c     

  inflating: byedpi-main/mpool.h     

  inflating: byedpi-main/packets.c   

  inflating: byedpi-main/packets.h   

  inflating: byedpi-main/params.h    

  inflating: byedpi-main/proxy.c     

  inflating: byedpi-main/proxy.h     

  inflating: byedpi-main/readme.txt  

  inflating: byedpi-main/win_service.c  

  inflating: byedpi-main/win_service.h  

boris@fedora:~/Downloads$ cd *main

boris@fedora:~/Downloads/byedpi-main$ ll

total 180

-rw-r--r--. 1 boris boris  5202 Aug  1 20:45 conev.c

-rw-r--r--. 1 boris boris  2007 Aug  1 20:45 conev.h

-rw-r--r--. 1 boris boris 14645 Aug  1 20:45 desync.c

-rw-r--r--. 1 boris boris   361 Aug  1 20:45 desync.h

drwxr-xr-x. 1 boris boris    14 Aug  1 20:45 dist

-rw-r--r--. 1 boris boris  1731 Aug  1 20:45 error.h

-rw-r--r--. 1 boris boris 10814 Aug  1 20:45 extend.c

-rw-r--r--. 1 boris boris   532 Aug  1 20:45 extend.h

-rw-r--r--. 1 boris boris 13229 Aug  1 20:45 kavl.h

-rw-r--r--. 1 boris boris 22060 Aug  1 20:45 main.c

-rw-r--r--. 1 boris boris   342 Aug  1 20:45 Makefile

-rw-r--r--. 1 boris boris  1890 Aug  1 20:45 mpool.c

-rw-r--r--. 1 boris boris   476 Aug  1 20:45 mpool.h

-rw-r--r--. 1 boris boris 10294 Aug  1 20:45 packets.c

-rw-r--r--. 1 boris boris  1045 Aug  1 20:45 packets.h

-rw-r--r--. 1 boris boris  1800 Aug  1 20:45 params.h

-rw-r--r--. 1 boris boris 25119 Aug  1 20:45 proxy.c

-rw-r--r--. 1 boris boris  1909 Aug  1 20:45 proxy.h

-rw-r--r--. 1 boris boris 14167 Aug  1 20:45 readme.txt

-rw-r--r--. 1 boris boris  2439 Aug  1 20:45 win_service.c

-rw-r--r--. 1 boris boris    44 Aug  1 20:45 win_service.h

boris@fedora:~/Downloads/byedpi-main$ make -j4

cc -std=c99 -O2 -D_XOPEN_SOURCE=500  packets.c main.c conev.c proxy.c desync.c mpool.c extend.c -I . -o ciadpi

boris@fedora:~/Downloads/byedpi-main$ ll

total 248

-rwxr-xr-x. 1 boris boris 66752 Aug  3 15:56 ciadpi

-rw-r--r--. 1 boris boris  5202 Aug  1 20:45 conev.c

-rw-r--r--. 1 boris boris  2007 Aug  1 20:45 conev.h

-rw-r--r--. 1 boris boris 14645 Aug  1 20:45 desync.c

-rw-r--r--. 1 boris boris   361 Aug  1 20:45 desync.h

drwxr-xr-x. 1 boris boris    14 Aug  1 20:45 dist

-rw-r--r--. 1 boris boris  1731 Aug  1 20:45 error.h

-rw-r--r--. 1 boris boris 10814 Aug  1 20:45 extend.c

-rw-r--r--. 1 boris boris   532 Aug  1 20:45 extend.h

-rw-r--r--. 1 boris boris 13229 Aug  1 20:45 kavl.h

-rw-r--r--. 1 boris boris 22060 Aug  1 20:45 main.c

-rw-r--r--. 1 boris boris   342 Aug  1 20:45 Makefile

-rw-r--r--. 1 boris boris  1890 Aug  1 20:45 mpool.c

-rw-r--r--. 1 boris boris   476 Aug  1 20:45 mpool.h

-rw-r--r--. 1 boris boris 10294 Aug  1 20:45 packets.c

-rw-r--r--. 1 boris boris  1045 Aug  1 20:45 packets.h

-rw-r--r--. 1 boris boris  1800 Aug  1 20:45 params.h

-rw-r--r--. 1 boris boris 25119 Aug  1 20:45 proxy.c

-rw-r--r--. 1 boris boris  1909 Aug  1 20:45 proxy.h

-rw-r--r--. 1 boris boris 14167 Aug  1 20:45 readme.txt

-rw-r--r--. 1 boris boris  2439 Aug  1 20:45 win_service.c

-rw-r--r--. 1 boris boris    44 Aug  1 20:45 win_service.h

boris@fedora:~/Downloads/byedpi-main$ vi *.txt

boris@fedora:~/Downloads/byedpi-main$ ./ciadpi --disorder 1 --auto=torst --tlsrec 1+s &

[1] 24201

boris@fedora:~/Downloads/byedpi-main$ ps

    PID TTY          TIME CMD

  24094 pts/0    00:00:00 bash

  24201 pts/0    00:00:00 ciadpi

  24206 pts/0    00:00:00 ps

Firefox Proxy Config













Another attempt

boris@fedora40Plasma604:~/Downloads/byedpi-main/byedpi$ ./ciadpi --auto=torst --tlsrec 1+s  --split 7 --disorder 23 &
[1] 13349
boris@fedora40Plasma604:~/Downloads/byedpi-main/byedpi$ ps
    PID TTY          TIME CMD
   7850 pts/0    00:00:00 bash
  13349 pts/0    00:00:00 ciadpi
  13354 pts/0    00:00:00 ps
boris@fedora40Plasma604:~/Downloads/byedpi-main/byedpi$ sudo netstat -antp|grep 1080
[sudo] password for boris: 
tcp        0      0 0.0.0.0:1080            0.0.0.0:*               LISTEN      13349/./ciadpi 



Final step would be to create service ciadpi.serivce , enable it and restart the box to make sure

$ cat ciadpi.service

[Unit]

Description=Script Daemon For Test User Services

[Service]

Type=simple

#User=

#Group=

ExecStart=/home/boris/Downloads/byedpi-main/ciadpi  --disorder 1 --auto=torst --tlsrec 1+s 

Restart=on-failure

StandardOutput=file:%h/log_file

[Install]

WantedBy=default.target


Next step:


$ sudo cp ciadpi.service  /etc/systemd/user/

systemctl --user daemon-reload

systemctl --user start ciadpi.service

$ systemctl --user enable ciadpi.service


boris@fedora:~$ systemctl --user status ciadpi.service
● ciadpi.service - Script Daemon For ciadpi
     Loaded: loaded (/etc/xdg/systemd/user/ciadpi.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/user/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Sat 2024-08-03 21:43:16 MSK; 42s ago
   Main PID: 2464 (ciadpi)
      Tasks: 1 (limit: 38309)
     Memory: 328.0K (peak: 1.5M)
        CPU: 7ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/ciadpi.service
             └─10771 /home/boris/Downloads/byedpi-main/ciadpi --disorder 1 --auto=torst --tlsrec>

Aug 03 21:43:16 fedora systemd[2428]: Started ciadpi.service - Script Daemon For ciadpi.

boris@fedora:~/Downloads/byedpi-main$ netstat -antp|grep 1080
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:1080            0.0.0.0:*               LISTEN      2470/ciadpi         
tcp        0      0 127.0.0.1:1080          127.0.0.1:49694         ESTABLISHED 2470/ciadpi         
tcp        0      0 127.0.0.1:58020         127.0.0.1:1080          ESTABLISHED 7675/firefox        
tcp        0      0 127.0.0.1:1080          127.0.0.1:42404         ESTABLISHED 2470/ciadpi         
tcp        0      0 127.0.0.1:1080          127.0.0.1:52208         ESTABLISHED 2470/ciadpi         
tcp        0      0 127.0.0.1:58014         127.0.0.1:1080          ESTABLISHED 7675/firefox        
tcp        0      0 127.0.0.1:52208         127.0.0.1:1080          ESTABLISHED 7675/firefox        
tcp        0      0 127.0.0.1:1080          127.0.0.1:58020         ESTABLISHED 2470/ciadpi         
tcp        0      0 127.0.0.1:42404         127.0.0.1:1080          ESTABLISHED 7675/firefox        
tcp        0      0 127.0.0.1:49694         127.0.0.1:1080          ESTABLISHED 7675/firefox        
tcp        0      0 127.0.0.1:1080          127.0.0.1:58014 
ESTABLISHED 2470/ciadpi  

Proxy Switch on Google Chrome





















References