If you like devops and security, have a look at SRE (Site Reliability Engineering) positions. Companies look for software engineers to fill these positions. And you'll work on security related stuff. Not necessarily pen-testing per se, but network security, operational security, etc.
Also, teams with SRE expertise most likely use modern tech because SRE itself is a rather new way of managing infrastructure. So you'll probably be able to get your hands dirty with lots of cool tech.