The U.S. Securities and Exchange Commission said Wednesday night that its online filing system was hacked and the culprits may have made profits on illicit trades.