In this paper we suggest a general stochastic maximum principle for optimal control of anticipating stochastic differential equations driven by a Lévy type of noise. We use techniques of Malliavin calculus and forward integration. We apply our results to study a general optimal portfolio problem of an insider. In particular, we find conditions on the insider information filtration which are sufficient to give the insider an infinite wealth. We also apply the results to find the optimal consumption rate for an insider.