(....)
If I understood correctly, I believe there is another way to achieve this where the scammer uses the dusting attack! He just needs to generate a vanity address matching the victims address and send a tiny amount of cryptocurrency (a dusting transaction) from this vanity address. And later if the user isn't careful enough and copies address from previous transactions history, then there is a good chance that he might end up copying the scammers address and send the funds to the wrong address without even realizing it.
This is pure effort if generating a vanity address for your target, I am curious how much time it needed to copy an address with identical characters on the first and last few characters of every Bitcoin address, like it's worth it for these attackers to do it?
To know this answer, we need to know a little more in depth.First, we need to know through which process hackers perform this task.
Hackers basically generate addresses by brute-force using tools like vanitygen by matching the couple of first and last characters of an address.
Now it is a general knowledge that the better the configuration of the computer, the faster it can bruteforce.
For example, it may take some seconds to generate an address by matching the 1st 4 characters and the last 4 characters by using a GPU, or if hackers use ASIC miners, it may they will be generated immediately.
For example I am giving an image here-