Google is your friend, mate.
The DSTwo site has everything you need. The download section has the firmware and a guide to setup the SD Card:
http://eng.supercard.sc/manual/dstwo/download.htm
I'm new here and have only just downgraded my N3DS today so take this with a grain of salt but, given that the newest system update is exploitable, you should be able to update to it then downgrade.
I used this Reddit post for help...