Before coming to the real technique that when they give benefic results. I must refresh your memory about fundamentals of these houses.
In Vedic Astrology, as per the sage Parashar- the lord of tri-shad-aye (3rd, 6th, & 11th) gives malefic results in their dashas. Where lord of 11th is most malefic & least is 3rd.
The lord of 8th & 12th are neutral, i.e. their results depends on other PAC associations. Understand that 6th, 8th & 12th are trik houses, but out of them only 6th is malefic in itself & other two depends on others. 8th house is most neutral means it changes its nature very easily, thus can be good or bad, it depends. 12th house is neutral again, but not as sensitive lord of 8th house.
If lord of 8th house is also the lord of any of the trine (1, 5 or 9) then it is not much harmful, same for 12th lord & they can be beneficial. Now, if the lord of 8th & 12th is lord of tri-shad-aye houses also then they are malefic.
E.g.- For Scorpio ascendant- Mercury is lord of 8th & 11th, being lord of 8th, it is neutral, but also owning 11th house it turns a malefic, also enemy of lagan lord Mars makes it a bad planet for Scorpio.
Another e.g.- For Virgo ascendant- Mars is lord of 8th & 3rd house, here again Mars is lord of 8th so neutral & but owning 3rd house makes it malefic for Virgo.
Note- In such cases if any natural malefic planet (Mars & Saturn) own 8th or 12th house & also any of the tri-shad-aye, then they turn worse compared to natural benefics (Jup, Venus & Mercury) owning such houses.
Subtle Differences– In above examples Mars is little worse for Virgo lagan then Mercury for Scorpio. But again, Mercury own 11th house in Scorpio & Mars 3rd house & 11th house is more malefic than 3rd, so they are almost equally bad, though Mars may be more dangerous because of its naturally fierce nature.