The last type of breakpoint to talk about is memory breakpoints. It's not common to see an anti memory breakpoints trick, but they can be easily detected by using the ReadProcessMemory API with the malware's ImageBase as an argument and the SizeOfImage as the size. ReadProcessMemory will return False if any page inside the malware is guarded (PAGE_GUARD) or set to no-access protection (PAGE_NOACCESS).
For a malware sample to detect a memory breakpoint on write or execute, it can query any memory page protection using the VirtualQuery API. Alternatively, it can evade them by using VirtualProtect with PAGE_EXECUTE_READWRITE argument.
The best way to deal with these anti-debugging tricks is to set breakpoints on all of these APIs and force them to return the desired result to the malware in order to resume normal execution.