Add a host-only network interface to the VM and configure it in "/etc/network/interfaces"
auto enp0s8
iface enp0s8 inet static
address 192.168.56.101
netmask 255.255.255.0
#network 192.168.56.0
#broadcast 192.168.56.255
#gateway 192.168.56.1
Install samba with sudo apt install samba
Add the following lines at the end of "/etc/samba/smb.conf"
[shared]
comment = Debian shared folder
path = /home/<username>/shared
browsable = no
guest ok = no
read only = no
create mask = 0755
Add local user and password to samba database with sudo smbpasswd -a <username>
If the host is a windows and the communication host <-> guest is not working, use this guide to set up the windows firewall https://serverfault.com/a/333584
If host and guest can communicate but windows can't access the shared folder, enable the windows feature SMB 1.0/CIFS Client following the next guide https://www.asus.com/support/FAQ/1037477/