With increasing Internet of Things device connected to the Internet, security problems have raised awareness. Distributed denial of service (DDoS) is a kind of common and dangerous attack towards particular Internet infrastructure, which arouses the necessity to develop powerful technologies to detect such attack. Former researches have discussed various detection models. However, due to lack of big data in the real world, some researches built their models using simulative data, which has imbalance between different classes. This project applies data resampling technologies to solve the problem of imbalance and compares the detection ability of some widely used machine learning applications using the balanced data. The results indicate that using balanced data help train models better and machine learning algorithms can detect DDoS attack.