Axiomatic definition of groups To define natural numbers one can either:

*

*use the Peano axioms in second-order logic;


*encode them in set theory as von Neumann ordinals.
The relation between those two definitions of natural numbers is that
(2) satisfies (1).
Now, groups are usually defined as sets equipped with operations and axioms. This is akin to (2) above since it is an encoding of groups in set theory.
What would be a definition of groups akin to (1)?
 A: This is too long for a comment. Given the negative reception of the current answers, and the confusion on the original question, I thought I would add what I think is being asked, and why the current answers don't work. (For what it's worth, I did not downvote either answer.)
It appears to me that the OP is trying to compare the class of all groups to the set of natural numbers. In other words, a single group is compared to a single natural number. This is why it is claimed that the definition of groups via axiomatization is akin to (2), rather than (1). Specifically:

*

*Given a model $M$ of ZF, one can define which sets in $M$ are  natural numbers using the von Neumann definition: a set is a natural number if and only if blah blah...


*Given a model $M$ of ZF, one can define which pairs of sets in $M$ are groups (where the pair consists of the underlying set of the group and the graph of the binary operation) using straightforward axioms: a pair of sets is a group if and only if blah blah...
There are some problems with this, as pointed out in Ned's comment. For example the natural numbers don't change depending on the model of ZF, while on the other hand different models of ZF could disagree about which groups they contain. But even still, the analogy does make sense.
On the other hand, the current answers make a comparison between the set of natural numbers and a particular group (rather than the class of all groups). So this doesn't seem to be what the OP is after in something akin to (1).
In my estimation, something akin to (1) would be an axiomatic theory $T$ which fits the analogy
$$
\text{ $T$ : group :: Peano axioms : natural number}
$$
So the class of groups would somehow be the "standard model" of $T$ (whatever that might mean) in the same way the natural numbers are the standard model of PA. But already there are issues with how to make this precise. At the very least, I think one would want to represent groups as isomorphism classes or presentations, rather than sets. Then one could make some "meta-axiomatizations" of special sets of group presentations. For example, one could "axiomatize" sets of group presentations that contain the finite cyclic groups and are closed under direct product. Then the finite abelian groups would be something like the "standard model". But this is not nearly rigorous enough.
So I don't know what the right answer is, or if there is a good answer at all. Hopefully what I've said isn't total nonsense, and I haven't misconstrued the original intent of the question.
A: To axiomatize the collection of all groups is far more difficult than to axiomatize the set of all natural numbers. There are, well, a lot of groups, and in particular it makes little sense, foundationally or practically, to try to axiomatize the mere set of all groups. One approach, as mentioned in comments, is to axiomatize the category of groups. You can read a summary of the results of Leroux on this question in ArnaudD's answer here. The axioms are rather technical, but again, this is perhaps to be expected from such an ambitious question.
A related topic which has been somewhat more thoroughly studied, including a nice exposition by Todd Trimble, is the axiomatization of the category of all sets. This is still complicated, though a bit better; you can get close by saying that the category of sets is a category admitting finite products and equalizers, powersets, such that the terminal object detects equality of morphisms, there is a natural numbers object, and the axiom of choice holds. At least, it's reasonable to say that "the objects of such a category are things we call 'sets' ", though without further axioms such a category may not contain all sets.
A: As essentially listed on the "groups" section of the "List of first-order theories" English Wikipedia page, one approach would be to have a constant symbol $1$ for the identity, a unary function symbol $\cdot^{-1}$ for inverses, and a binary function $\cdot*\cdot$ (we'll write it as an operation), satisfying these axioms:

*

*$\forall x,\,1*x=x\land x*1=x$

*$\forall x,\,x^{-1}*x=1\land x*x^{-1}=1$

*$\forall x,\,\forall y,\,\forall z,\,(x*y)*z=x*(y*z)$
A group is then a model of these axioms.
A: I'd argue the definition of groups you are referring to is akin to (1) the Peano axioms and not to (2) the von Neumann construction of $\mathbb N$.
The peano axioms specify abstractly what "a system of natural numbers" is by axiomatizing properties:

A set $N$ together with a map $s\colon N\to N$ is called a system of natural numbers if the axioms … are satisfied.

That is exactly what the usual definition of groups does:

A set $G$ together with a map $m\colon G\times G\to G$ is called a group if the axioms … are satisfied.

The important difference is that in the case of systems of natural numbers, all models satisfying the axioms turn out to be isomorphic. So there is only one concept of "natural numbers" up to isomorphism and one model would be the construction of von Neumann. In the case of groups, there are many non-isomorphic models satisfying the axioms.
The analogy of the von Neumann construction would be any explicitly constructed group by giving a concrete set and writing down how to multiply its elements.
