The betaori techniques mentioned before, were all assuming that you had enough safe tiles. Usually, when someone is attacking and you hold two or more safe tiles, there's a high chance of avoiding a deal-in. The reason is that once you have discarded two safe tiles, chances are there'll be more safe tiles. According to statistics, when your hand is closed, there's a 50% chance of drawing a safe tile. (Including the tiles discarded by the player in riichi or other players, and the tiles you draw and confirmed to be safe tiles.)
Even so, there are times when we have no safe tiles when someone is attacking. The following text will introduce a few commonly seen methods.
1) Dismantle anko/toitsu
This is the most commonly seen method, mainly based on the idea that "betting on a dangerous tile can buy a few safe tiles".
Sometimes, just when we've just dealt with all the word tiles, the opponent declares riichi.
However there are no safe tiles here. In normal situations, I would recommend discarding the half suji-pai of 6 wan. Betting on a dangerous tile can buy a few safe tiles. If there are no safe tiles even after discarding finish all three 6 wan(the probability is very low), you can still rely on suji-pai of 3 wan. By the way, if the attacking player discards 9, and if you have 3 and 6 in your hand, discarding 6 is tesuji.
This idea remains useful even when there are safe tiles available.
When someone declares riichi, and your hand is like this:
The only suji-pai is 3s, and 1 pin is one chance, while the rest are not suji-pai. As the suji-pai is a dora soba, you might not feel comfortable in discarding it, therefore you can discard the riskier 1 wan. Once 1 wan passes, you won't have to worry about not having any safe tiles. You're already in a dangerous situation, and if you discard 3 sou first and don't get any safe tiles in the next discard, you'll still have to discard 1 wan. Compared to discarding 1 wan before, 3 sou becomes a pointless risky tile.
2) Kanzen Shinko
When you don't have any safe tiles, going into kanzen shinko is also a choice, especially when you have called any tiles. You have to understand, that the lesser the amount of tiles in your hand, the lower the chances of new tiles appearing for the next round of discards. Of course, whether or not to attack, is also dependent on the points situation.
[First image in http://blog.jpmahjong.net/read.php/549.htm]
Like the example above, there's only one suji-pai of 3 wan, it is logical to discard 8 wan or 7 sou to kanzen shinko. Even if you discard 3 wan, you'll probably need to discard more dangerous tiles in the future. Even though the chances of winning is low, but the value of the hand is high enough and you're the dealer. Summoning up your courage and attack seems to be the only choice here.