But how would I calculate it so it could grab marked walls, as if they were cracks on the mountain, and hold there until the player releases a button?
There are two steps to this: first, the surface must be detected, and second, the character must attach to it.
To detect the surface, the SupportFinder.SideContacts might be usable. Depending on the geometry of the surface and the desired behavior, this might not work very well since it requires the character to touch the surface rather than merely come near it.
Another option is to cast a ray or multiple rays towards likely candidates in the immediate vicinity. The QueryManager.RayCast could assist with this- it already has the pruned set of objects near the body. The ray direction could be chosen heuristically based on movement direction, or a large number of brute force samples could be used.
To attach to a detected surface, there are a few options. The simplest is just to set the velocity of the character such that it doesn't move relative to the attachment. This is pretty easy for a static attachment, but becomes more complex for a dynamic object. The desired velocity of the character would be based on the linear and angular velocity of the parent, along with the offset. However, since setting the character's velocity doesn't apply any force to the parent object, the parent's motion will be unaffected.
A more physically consistent approach is to use a constraint. Something like a WeldJoint (which is just a BallSocketJoint and NoRotationJoint combined) would work. However, since the character can't rotate at all by default, just using a BallSocketJoint alone with the anchor at the character's center of mass would be an option- using a NoRotationJoint with a CharacterController would stop the rotation of the parent object.
The lack of rotation in the character controller will cause other issues if the parent object rotates into collision with the character, though. If possible, avoid this case. If it ends up being necessary, options include either using a rotating proxy while attached to an object, or modifying the character to allow physical rotation (which is doable, though not extremely simple).
And how can detect that the CharacterControler jumped at least half higher than a block and that it can automatically grab and "step up" on it, "à la" "Tomb Raider"?
It sounds like you might be able to accomplish something similar by just removing the condition that stops stepping from working when the character lacks traction. It's in the StepManager.TryToStepUp function.