The branching fractions of the doubly Cabibbo-suppressed decays D + → K − K + K + , D + → π − π + K + and D s + → π − K + K + are measured using the decays D + → K − π + π + and D s + → K − K + π + as normalisation channels. The measurements are performed using proton-proton collision data collected with the LHCb detector at a centre-of-mass energy of 8 TeV, corresponding to an integrated luminosity of 2.0 fb −1 . The results areℬ(D+→K−K+K+)ℬ(D+→K−π+π+)=(6.541±0.025±0.042)×10−4,ℬ(D+→π−π+K+)ℬ(D+→K−π+π+)=(5.231±0.009±0.023)×10−3,ℬ(Ds+→π−K+K+)ℬ(Ds+→K−K+π+),=(2.372±0.024±0.025)×10−3, where the uncertainties are statistical and systematic, respectively. These are the most precise measurements up to date.[Figure not available: see fulltext.].