Mallard ducks are not generally known to attack humans. You may be thinking of another type of duck or another animal altogether.
Ducks are usually peaceful, except during mating season, which lasts about four months from September to January. During this time, territorial or food-related conflicts may occur.