This FreeBSD module shows how to intercept getpass(3) function and print anything that is typed without terminal echo.