I would attach 2×4’s flat side against the wall with TapCon concret screws. Space the 2 by’severy 16 inches and a screw every 12 inches down the length of it. You will have to drill a pilot hole in the mortar joint for every screw. Your local hardware or lumber yard can help you.