Generally speaking, if your machine is infected, you are vulnerable no matter what.
A physical token or “out of range” token is designed to solve the problem of “identity” and gives the bank a higher confidence that the person who enters the system is what they call themselves. Such a mechanism usually involves the use of the “one time code” method, so even if someone records a conversation with a bank, the token cannot be reused. However, if malware intercepts in real time, then they can maliciously manage the account after you have successfully logged in, but often banks require a new “code” every time you try to do something like transferring money from account. Thus, malware will have to wait until you do it legitimately, and then modify the request. However, most malware is not real-time and sends data to a third party for collection and subsequent use. Using these “one-time token” methods would successfully protect against this subsequent processing of login data, since the recorded data cannot be used later for logging in.
To answer your question, there is no way to protect yourself from this only in code. Everything you do can be specifically handled by malware.
Osseta
source share