Wireless Sensor Network (WSN) is a distributed sensor network composed a large number of nodes with low cost, low performance and self-management. The special structure of WSN brings both convenience and vulnerability. For example, a malicious participant can launch attacks by capturing a physical device. Therefore, node authentication that can resist malicious attacks is very important to network security. Recently, blockchain technology has shown the potential to enhance the security of the Internet of Things (IoT). In this paper, we propose a Blockchain-empowered Authentication Scheme (BAS) for WSN. In our scheme, all nodes are managed by utilizing the identity information stored on the blockchain. Besides, the simulation experiment about worm detection is executed on BAS, and the security is evaluated from detection and infection rate. The experiment results indicate that the proposed scheme can effectively inhibit the spread and infection of worms in the network.